In some of cases, we need to repeat same data in listview for endless or we can say infinate listview. So, this code may be helpful in that case. You can use this adapter. public class CircularListAdapter extends BaseAdapter { // Debug static final boolean …
android
Access Shared preference data from one application to another application
Create Shared preferece data in first application set its mode to MODE_WORLD_READABLE. Here is a following snippet you can find how to create shared preference and store data into it. mSharedPrefs = getSharedPreferences(“Prefs_First”, MODE_WORLD_READABLE); SharedPreferences.Editor editor = mSharedPrefs.edit(); editor.putString(“name”, etName.getEditableText().toString()); editor.putString(“password”, etPassword.getEditableText().toString()); editor.commit(); In another …
AutoCompleteTextView: Remove soft keyboard on back press instead of suggestions
We can achieve that by override-ing onKeyPreIme in your custom AutoCompleteTextView. public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context) { super(context); } public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } public CustomAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Override …
Is Sender ID Private in GCM push notification?
It is fine to expose sender id because it has no meaning without serverkey.
Decompile .JAR extension files
Here are following steps decompile .JAR file Download and install JD-GUI software from http://jd.benow.ca/ as per your OS. Open .Jar file in JD-GUI software. Go to file and click on “Save as” to set destination path. You will find decompiled file in your corresponding destination …
How save the state of RecyclerView row item?
If you are using RecyclerView you need to maintain states of each row, means if you are checking using a condition(i.e. if) at any stage of RecyclerView item(in recyclerview adapter class) then you need to handle else as well. Here is the sample RecyclerViewAdapter : …
Get typing status of EditText in Android
You can determine whether the user is typing or not you have to create one CustomEditText class which extends to EditText. This type of functionality is widely used in Chat application. Here is a snippet of CustomEditText public class CustomTypingEditText extends CustomEditTextNormal implements TextWatcher { …