up-button

Returning from an activity using navigateUpFromSameTask()

拟墨画扇 提交于 2019-12-17 03:47:43
问题 I have two activities, A and B. When activity A is first started, it accesses the Intent passed to it (because the Bundle is null , as it should be the first time through), and displays information accordingly: CustInfo m_custInfo; ... protected void onCreate(Bundle savedInstanceState) { ... Bundle bundle = (savedInstanceState == null) ? getIntent().getExtras() : savedInstanceState; m_custInfo = (CustInfo) m_bundle.getSerializable("CustInfo"); if (m_custInfo != null ... } This works fine the

Android up button isn't working

牧云@^-^@ 提交于 2019-12-13 00:23:49
问题 I have a simple application. It consists of Activity A and Activity B. When I start at Activity A (from the launcher icon) and then navigate to Activity B, and then hit the up button. I arrive at Activity A. Perfect. Yet when I start activity B from the command line (simulating another app or a notification starting this activity) and I hit the up button, I just get taken to the home screen. Here is my setup: Activity A public class ActivityA extends AppCompatActivity { @Override protected

How do I set the activity of the Android Up-button dynamically?

怎甘沉沦 提交于 2019-12-11 07:59:20
问题 The following two methods seem like they should do the trick, but I can't get them to work. Does anyone how to get these methods to work, or know of another way? getSupportParentActivityIntent http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html#getSupportParentActivityIntent() onCreateSupportNavigateUpTaskStack http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html#onCreateSupportNavigateUpTaskStack(android.support.v4.app

How to implement getSupportParentActivityIntent() to set the activity dynamically for up-button in android [duplicate]

旧时模样 提交于 2019-12-11 02:41:55
问题 This question already has answers here : Dynamically set parent activity (8 answers) Closed 10 months ago . How to know which parent activity calls the child activity in android? Assume I have three activities A,B and C. A and B are parent activities. C is the child activity. That means C can be started by either from A or B. So how can I know which parent activity causes to start the child activity? The problem is I need to set the back button according to that parent intent.For that I want

Change custom Up/Back Button Icon on Android ActionBar

北城余情 提交于 2019-12-06 04:03:40
问题 I'm trying to use a custom up/back button icon with a different color since I haven't been able to figure out a straight forward way of changing the color of the default android up/back button. I downloaded a 128x128 back button icon (PNG) and changed it to the color I want, also placed it in my drawable folder. But i have not been able to get it to display, still. Here's what I tried so far, In my Styles.xml, I included this: <style name="customStyle" parent="@style/Theme.AppCompat.Light

How to customize the “up” button when the searchView is being expanded?

非 Y 不嫁゛ 提交于 2019-12-05 16:03:16
问题 Background My app has the ability to search for items (which are other apps) using the SearchView on the ActionBar. The app uses the support library of Google, and it works well on all versions of Android from API 9 . The problem On Lollipop, when I click the search action item in order to start searching, I notice that the up/back button on the top-left corner gets to be white, which is bad for this case since the actionbar background is also quite white: Weird thing is that it doesn't

How to customize the “up” button when the searchView is being expanded?

£可爱£侵袭症+ 提交于 2019-12-04 02:34:01
Background My app has the ability to search for items (which are other apps) using the SearchView on the ActionBar. The app uses the support library of Google, and it works well on all versions of Android from API 9 . The problem On Lollipop, when I click the search action item in order to start searching, I notice that the up/back button on the top-left corner gets to be white, which is bad for this case since the actionbar background is also quite white: Weird thing is that it doesn't always occur, and I don't think it occurs on Android versions that aren't Lollipop (tested on multiple

Dismiss dialog causes activity finish

浪尽此生 提交于 2019-11-28 10:15:45
问题 My PanelActivity contains a recyclerView with a list of items. Each item has a click event. This click opens DetailsActivity . DetailsActivity has a floatingActionButton that opens a full screen dialog (my class DetailDialogFragment extends DialogFragment ). DetailDialogFragment has an Up/Home button with a dismiss. The problem: If the user performs a click over the Up button, the dialog is dismissed, but also DetailsActivity disappear, and the app returns to the PanelActivity . Possible

Returning from an activity using navigateUpFromSameTask()

淺唱寂寞╮ 提交于 2019-11-26 17:04:21
I have two activities, A and B. When activity A is first started, it accesses the Intent passed to it (because the Bundle is null , as it should be the first time through), and displays information accordingly: CustInfo m_custInfo; ... protected void onCreate(Bundle savedInstanceState) { ... Bundle bundle = (savedInstanceState == null) ? getIntent().getExtras() : savedInstanceState; m_custInfo = (CustInfo) m_bundle.getSerializable("CustInfo"); if (m_custInfo != null ... } This works fine the first time through. The EditText controls and ListView are filled out correctly. Now, when an item in