android-activity

How to manage multiple Activity stacks in an Android app, like you would on iOS with multiple UINavigationControllers within a UITabBarController?

…衆ロ難τιáo~ 提交于 2020-01-02 05:14:25
问题 A fairly common model for iOS apps seems to have a single UITabBarController, where each tab essentially holds a UINavigationController, i.e. a stack of controllers, and pressing a tab switches to the top of the corresponding stack. Can I get the same behavior on Android without a lot of custom code? (Note: I am using menus instead of tabs on Android). After reading http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html the closest I can see is to have multiple tasks

launch activity from service when notification is clicked

℡╲_俬逩灬. 提交于 2020-01-02 03:36:29
问题 I know, there are tons of these on here, but I've been trying solutions all day and haven't gotten anywhere. Neither the example on google's docs, nor any of the 5 other ways I've found on here have worked for me at all. As is the typical case, when I click the notification it closes the status bar and nothing new is shown onscreen. I am creating the notification from a service and need the notification to trigger a new activity that has not yet been created. I also will need a way to pass

android open dialogue activity without opening main activity behind it

青春壹個敷衍的年華 提交于 2020-01-02 03:36:06
问题 Im writing a program that offers a quick reply dialog upon receipt of an SMS. However, I am getting an unexpected result. When I receieve an SMS, the appropriate dialog activity comes up displaying the correct phone number and message, however there is a second activity behind it that is the 'default' activity in my program (it is what opens when i launch my application) I do not want this second activity to come up. The quick reply activity should come up by itself over top of whatever the

Flag Activity Clear Top destroys target activity and than creating it

给你一囗甜甜゛ 提交于 2020-01-02 03:12:28
问题 I am watching a behavior of Intent.FLAG_ACTIVITY_CLEAR_TOP. For example i have three activities A,B and C Now Flow is A -> B -> C Now when i am starting A from C with this flag with following code. Intent intent_to_a=new Intent(C.this,A.class); intent_to_home.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent_to_a); AFAIK, Intent.FLAG_ACTIVITY_CLEAR_TOP should remove B and should resume the A .It also does the same but in a strange way. It removes B , than removes A than creates A

No Longer want ActivityManager - Not a service issue

只愿长相守 提交于 2020-01-02 03:11:29
问题 I am working on a open source application (droidwall fork) and i am stuck with one of the issue were the iptables rules were not applied properly when the system reboots. it works perfectly on most of the android versions. But on some specific ROMS (CM 10.1) it gives the following logcat 12-26 08:39:27.116 I/ActivityManager(582): No longer want dev.ukanth.ufirewall (pid 2297): empty #17 My code works somethings like below, private Handler mHandler = new Handler(Looper.getMainLooper());

No Longer want ActivityManager - Not a service issue

感情迁移 提交于 2020-01-02 03:11:27
问题 I am working on a open source application (droidwall fork) and i am stuck with one of the issue were the iptables rules were not applied properly when the system reboots. it works perfectly on most of the android versions. But on some specific ROMS (CM 10.1) it gives the following logcat 12-26 08:39:27.116 I/ActivityManager(582): No longer want dev.ukanth.ufirewall (pid 2297): empty #17 My code works somethings like below, private Handler mHandler = new Handler(Looper.getMainLooper());

Hide or remove Action Bar on specific Activity | Android

对着背影说爱祢 提交于 2020-01-02 02:11:05
问题 How I can remove Action Bar on specific activity not for all application, for example I have Sign Up activity and for this activity I want to remove Action Bar 回答1: In your AndroidManifest.xml use NoActionBar theme for your Activity like this: <activity android:name=".SignUpActivity" android:theme="@style/AppTheme.NoActionBar"/> and in your styles.xml <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> 回答2: from within

Is the Application instance always created before any Activities?

主宰稳场 提交于 2020-01-02 02:02:49
问题 In Android, you can provide your own implementation of the Application class by extending it and declaring the name in the Manifest. My question is, will this implementation always be created before the initial Activity, or can Activities be launched before the Application instance has had time to be created? 回答1: will this implementation always be created before the initial Activity Yes. It is one of the first objects instantiated in your process. 回答2: Yes Application class is the first

Resume old activity by passing new data in bundle

风流意气都作罢 提交于 2020-01-02 01:04:06
问题 I have couple of activities say A , B, C. Activity A starts B , B starts C and so on. In my app I have put a navigation drawer which allows users to go back to activity A. When user goes back to activity A I have passed some flags which don't actually restart the activity but just resumes it. intent = new Intent(activity, A.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); Now I m trying to pass some data using bundles. bundle.putInt("selectedTab",

How to start one activity from Customized View

只谈情不闲聊 提交于 2020-01-02 00:52:24
问题 How to start one activity from another View (another activity View) For example, public class CorrectSmoothGloflo extends Activity { ....................... setContentView(new Panel(this)); } public class Panel extends View { //This view class contains some drawable operation // Here i want to start another Activity like this Intent i=new Intent(CorrectSmoothGloflo.this,Screen.class); startActivity(i); } I cant do this operation. Because this is the View, that will not work, because View does