I want to create a button that would lead the user straight back to main activity which doesn’t have the android name=”com.example.example”. It has android.intent.etc… How can I reference my button to go back to this activity?
Could someone push me in the direction of some concrete, trustworthy (and preferably concise) information on the following: The order in which components are destroyed and (where applicable)recreated by the system (Fragment, Activity, Activity’s Threads/AsyncTasks/Timers, static data(when are classes unloaded?), Threads/AsyncTasks/Timers in other classes, host TabActivity, ActivityGroup, bound local Services, Application, process) both when the […]
I am using overridePendingTransition method to perform custom Activity animations. I would like to know when the animation ends ( a callback/listener ). Is there any direct way of achieving this, if not please suggest me some work around.
I newbie at programming Android and I try to do a widget which has be able get some data from ISP about my account. There are a lot of unknown things how to do it, but I have did a few things – I’ve got a widget with configure activity, where user should type login […]
I have a web service that returns a super simple list of objects MyObject data = webServiceCall(); MyObject has 1 field i want to display, “Name” (i.e. data.Name ) How can i turn this into an activity that lists just the name of these objects in a scrollable listActivity on Android. I am getting really […]
So this is my activity_main.xml: <?xml version=”1.0″ encoding=”utf-8″?> <layout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” tools:context=”MainActivity” > <!– A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. –> <android.support.v4.widget.DrawerLayout android:id=”@+id/drawer_layout” android:layout_width=”match_parent” android:layout_height=”match_parent” > <!– As the main content view, the view below […]
well that’s basically my doubt. Should I use the same Ad Unit ID for all the ads in my app or should I get one ID per Activity? Thanks
Common scenario – Activity with a background Service to poll server. The Service will run periodically via AlarmManager and also perform tasks for the Activity (user hits a button, go fetch something from server). I’d like to know the best practices here. I think the best design would be the Android LocalService example: http://developer.android.com/reference/android/app/Service.html#LocalServiceSample However […]
I’ve been programming for Android for some time, and I’m still looking for solutions to retain data over configuration changes. Aside from saving Parcelables to Activity’s Bundle in onSaveInstanceState docs are suggesting using Fragment with setRetainInstance flag set to true. But I’ve just come across some code that uses onRetainCustomNonConfigurationInstance to hold arbitrary objects (in […]
I’m developing an app which shows a notification to the user. The notification’s objective is to make it easy to the user to return to the activity when the user is in another activity. I am using this code in my app to create and show the notification. notification = new Notification(R.drawable.icon, “Notify”, System.currentTimeMillis()); notification.setLatestEventInfo(this, […]