This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); | |
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mrm.emoji; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.Map.Entry; | |
import android.content.Context; | |
import android.text.Spannable; | |
import android.text.SpannableStringBuilder; | |
import android.text.style.ImageSpan; | |
import com.mrm.emoji.R; | |
public class EmoticonUtils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) adaptHeightView:(UILabel *)label withText:(NSString *)text | |
{ | |
// First we must to set the text into the label | |
[label setText:text]; | |
// Get the label frame with the entire text | |
CGRect frame = [label frame]; | |
// Get the label size | |
// 1. Set the label font | |
// 2. Add size restrictions, set the label width and put a maximun height, in this case 9999 | |
// 3. Establish the line break mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public View getView(int position, View convertView, ViewGroup parent) { | |
View v = super.getView(position, convertView, parent); | |
if(position>lastAnimatedPosition){ | |
v.setRotationX(80); | |
v.setTranslationY(400); | |
v.animate() | |
.rotationX(0) | |
.translationY(0) | |
.setDuration(600) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cyrilmottier.android.translucentactionbar" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="14" | |
android:targetSdkVersion="17" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="Theme.TranslucentActionBar" parent="@android:style/Theme.Holo.Light.DarkActionBar"> | |
<item name="android:actionBarStyle">@style/Widget.ActionBar</item> | |
</style> | |
<style name="Theme.TranslucentActionBar.ActionBar" /> | |
<style name="Theme.TranslucentActionBar.ActionBar.Overlay"> | |
<item name="android:actionBarStyle">@style/Widget.ActionBar.Transparent</item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="Widget.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse"> | |
<item name="android:background">@drawable/ab_background</item> | |
</style> | |
<style name="Widget.ActionBar.Transparent"> | |
<item name="android:background">@android:color/transparent</item> | |
</style> | |
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cyrilmottier.android.translucentactionbar" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="14" | |
android:targetSdkVersion="17" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cyrilmottier.android.translucentactionbar; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.ScrollView; | |
/** | |
* @author Cyril Mottier | |
*/ | |
public class NotifyingScrollView extends ScrollView { |
OlderNewer