I am running my app with StrictMode activated in development as documented here StrictMode for lower platform versions and noticed an error message that I do not know what to think about nor can I find any reference. I get a android.os.StrictMode$InstanceCountViolation with values for instances and limit e.g. instances=3; limit=2 Now I am wondering: […]
I have a Sherlock Fragment Activity in which there are 3 Fragments. Fragment A, Fragment B, Fragment C are three fragments. I want to show a done option menu in Fragment B only. And the activity is started with Fragment A. When Fragment B is selected done button is added. @Override public void onCreate(Bundle savedInstanceState) […]
I am using Android Play Games – Real Time Multiplayer for my app. When I create a new room, the callback onRoomCreated() returns STATUS_NETWORK_ERROR_NO_DATA 5% of the times. I do not know why I get this error sporadic. Some post recommends should be closed before creating a new one. I always leave my rooms before […]
I try to enable and disable a broadcast receiver by using this PackageManager method: setComponentEnabledSetting(componentName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); The broadcast receiver is registered in the manifest. The receiver works fine but when i try to disable it, it still receives the broadcast messages. When i disable the receiver in the manifest by “android:enabled=”false””, the receiver does […]
I want to set my application to full screen view. I got the idea to set it in an individual activity using FullScreen and NoTitlebar, but i want to set it in my Manifest XML file for the whole application not for each activity… Is this possible? Help me… Thanks.
How do I use the String selectionArgs in SQLiteDatabase.query()? I wish I could just set it to null, as I have no use for it. I am just trying to load an entire unsorted table from a database into a Cursor. Any suggestions on how to achieve this?
I’m using android:paddingLeft and android:paddingTop to set the padding for the new CardView widget but it doesn’t work. I can set the margin for all the controls inside the CardView as a workaround but that’s a pain if there are too many controls. How to set padding for the new cardview widget? <android.support.v7.widget.CardView xmlns:card_view=”http://schemas.android.com/apk/res-auto” android:id=”@+id/card_view” […]
I am using an array adapter and to this am adding an array list of string s , the list is multi select , How can i get the values of list items clicked ? my_contacts_list.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); ArrayAdapter<String> adapter=new ArrayAdapter<String>(this, android.R.layout.simple_list_item_multiple_choice,conts_list); my_contacts_list.setAdapter(adapter); I was trying to do this , SparseBooleanArray positions = my_contacts_list.getCheckedItemPositions(); int size=positions.size(); int […]
I have an android app in which I am using Google Maps API for Android v2. It was working fine in my phone until I upgraded my phone to Marshmallow. After updating my phone once I uninstalled it and again installed it using Android Studio it started having random crash. And every time the error […]
The way the ViewPager scrolls right now is by one item per gesture. It treats flinging gesture the same way no matter if it’s full screen fast fling or slow dragging; at the end page advances one step only. Is there any projects perhaps or examples that would add velocity-based flinging that scrolls multiple items […]