From Android Jellybeans, all sub-activities of Settings activity are having this back button at top left corner which calls the Settings activity. It behaves more like a 'up' button for navigation purpose.
I have android code, and I want to disable this button for few sub-activities like display, sound etc. in my build.
Any suggestions, where do I have to modify to disable this?
I tried out removing
android:parentActivityName
tag from particular Activity in the Manifest file, but it didn't work.
Try this
getActionBar().setDisplayHomeAsUpEnabled(false);
Related
I'm having a toolbar in which I have a menu option so when the guide button from the menu is clicked the guide activity opens but now I want to add a back arrow on toolbar so I can navigate through button clcik and as I see some solutions many of them are suggesting
android:parentActivityName=".UI.HomeActivity" // UI.HomeActivity is where i want to go back
but I don't know why it doesn't seems to work I was not able to see any arrow on the left of the toolbar
and dont know(correct me if wrong) but tbh using android:parentActivityName=".UI.HomeActivity"
for navigating doesn't looks good to me , i was preferring manaul onClick listner on the icon(as image) in the tool bar , but dont know how do i do that
I have a listener on the whole app for the back button press event in android to override the default behaviour of back button(exit the app).
Also in some component i have override it too if i want the back button to be disabled or do something else.
The problem is when i open a react-native-picker, the picker stays on the screen ignoring the back button press.
I want it to first close (on the first back button press) and only then do what the higher component ordered to do when back button is pressed.
so i can't override the the higher component back button handling
i thought maybe to add the picker as a screen in the navigator and instead of planting it as a component, navigate to it, so it will be added to the stack navigator.
then by default it will first pop it of the stack when pressing back.
how can i add the picker component as a screen to navigate to, or is there a better way to do that?
By default the back behavior collapses or closes the picker on Android (depending on the mode you have chosen). You can see a working example here.
I use the Android Studio Navigation Drawer Project with one MainActivity and multiple Fragments which are replacing the container inside my MainActivity.
Sometimes when I open my software keyboard the Floating action button appears above the keyboard and sometimes the keyboard covers the fab. Does somebody know why?
It seems that somehow/sometimes your layout is not correctly changed. You should try to use android:windowSoftInputMode="adjustResize" in your activity tag in the manifest.
That should resize the content to the size above the keyboard and therefore the FAB should be always above.
From a UX point of view: Maybe you change the "submit" functionality and move it from a FAB to the toolbar (like the gmail app does). So FAB for a "new" or "add" functionality and as soon as the user can provide input, you show a "send"/"submit" button in the toolbar.
I have to show a floating button that will be added in WindowManager so it remain on the top of all Activities. (I have done this part using https://github.com/marshallino16/FloatingView)
When that button is tapped I have to open screen and show detail view and navigate between other views. To achieve this thing I can do following things either adding
1 - PopUpWindow
2 - Dialog
But I cannot provide navigation using either of them. So my questions is.
What is the best way to add multiple views and providing navigation between them while keeping everything above the application that is running it.
How can we add Activity so that it won't pause user application?
You should open Activity and implement all navigation inside it.
Android may pause activities behind, so make your Activity only for part of the screen.
Inside Activity hide floating button and show it again on exit.
I've read through all of the android documentation that I can find but I'm still not clear on whether a button can be added to an application for an android device somewhere outside of an options/context menu. It seems like all of the menu buttons are only accessible either from a tab bar at the bottom or the menu button on the device. Is this correct?
I'm not sure I understand what you mean, but you can use a Button widget in an activity anywhere you want, just like any other widget type. See:
http://developer.android.com/reference/android/widget/Button.html