Tab-bar Settings as overlay in tablet? - android

I'm using Android action bar to show settings as follow in phone version.
when i click on settings it will call SettingsActivity, However in Tablet version i have to show Settings in a different format like below.
Here Settings icon should open as a drawer overlay(over any screen) with settings. How to achieve this? Is there any controls for showing these kind of overlay? The inside settings page contains other controls like spinner, switch etc.

I would use a Fragment, and then detect if the user is using a tablet or a smartphone. If it's a tablet, open a SlidingMenu with the Fragment inside, if it's a smartphone, open a FragmentActivity with the same Fragment inside. You could also customize the fragment to look slightly differently in the different cases using the layout folders.

Related

Kindle Fire status bar and soft key bar bug

I am developing a magazine reader application aimed at the Kindle Fire. In landscape mode the built in softkey bar and status bar in the Kindle's operating system leave little room for my content so I have opted to run the activity in fullscreen mode using the following theme for the activity:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
This works fine, the status bar is hidden and the softbar is minimized like so:
I can bring up the menu bar by dragging it up like so:
The bug arises when I then click somewhere on screen to dismiss the softkey bar. The bottom bar slides back away, the top one does too but the space that it took up becomes a black void and my app is pushed down underneath it so my tab bar at the bottom of the app is now unusable:
I am using a tabhost activity here and the tab I am on in these screenshots is the actual reader section of the app. This subactivity uses a PDF viewer widget which is written using native code and this bug only happens on this tab. If I switch to one of the other tabs which contain no JNI code this bug does not happen so I'm pretty sure its the combination of the Kindle Fire OS, the fullscreen activity and the use of JNI code.
Has anyone else experience this issue?
Any help much appreciated!
Thanks
There are a couple of fullscreen modes for the Fire (at least the new ICS based ones) - check out https://developer.amazon.com/sdk/fire/cx-guidelines.html#Fullscreen for the options. I suspect the ICS Full Screen mode will be what you need
Also it's probably worth trapping the onOrientationChanged and onSizeChanged events to make sure you re-draw the screen correctly when the menu/toolbars appear and disappear per the screen layout sample at https://developer.amazon.com/sdk/fire/samples.html

recreate screen similar to the settings screen on the android tablet

I would like to create a screen similar to the settings screen on the android tablet. The screen is split in two with a list on the right. When a item is selected on the right the details are shown on the left. I also want to have similar graphics in terms of the littel arrow that shows which item has been selected. Can anyone point me in the right direction?
It is call Fragment Activity you can use this for same as settings layout in tablet.
For more information plz do search about Fragment Activity
Here is Best Link

Android Show/Hide Tabwidget On button Click

Hey can we hide/show tab layout on button click which will be placed below the tab widget it self.
Eg :
When i try to hide - setVisible(View.GONE) the tabwidget whole screens goes black.
The most straightforward way to me would just use the android menu as the way to choose between different tabs instead of a real tab view. When the user clicks on a menu button, you load another activity and the menu gets hidden again.
The tabhost is meant to stay there throughout the entire app lifecycle. Using it like this would be wrong. A way to achieve this using the tab would be to set it completely invisible and then load the activity that normally is in the tab on the whole screen.

Removing buttons from home screen

Can anyone point me on how to remove the existing buttons from the Android Launcher. I would like to remove the phone and explorer buttons and keep only the app drawer button. I went through the source code but couldn't notice three buttons being created. I was able to achieve the same with different home replacement app but it would be great if I could do it with default launcher app. Thanks.

Can I create a menu button somewhere other than the options menu in android?

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

Categories

Resources