android landscape dual pane resize - android

I have an app that is basically a listView which brings up a detail screen when an item is selected. In landscape I split the screen so that the left had pane contains the listView and the right hand pane contains the detail of the item selected on the left. The dual mode proportions are split 45:55 which is hardcoded in the layout xml. I want to give the user the ability to change the proportions to their own liking. Some kind of setting in Preferences would be OK. Even better would be a "widget" actually on the screen which they could slide to change the proportions. I haven't found a way of achieving this. Does anyone have any ideas?

Related

Android: Custom Gallery Activity

I am creating a custom gallery activity on the left side will have a tools panel and the right is where the preview image with list of thumbnails at the bottom.
Inside the tools, we have an option which let the user to click into full screen mode so the right side will be shown in full screen.
This is my first time doing this. I am wondering Fragment is the best solutions to do it.
The left fragment are the tool panel and the right fragment contains the gallery. When the full screen button in the left fragment was clicked, the left fragment's width became 0dp whereas the right fragment took the whole area.
You can use standard android-navigation drawer, where you can have your "tools"/widgets on a drawer panel and show the gallery in the container fragment.
or you can have a custom-design something like this: sattelite-menu
to have tools and display gallery as usual.
I have developed a similar app : blimp-github
Fragments are best solution to have if your app has very few screens where user is expected to swipe-navigate(makes it much simpler),
hope it helps....

android studio design view too small

I find the Android Studio (v1.0.1) layout "Design" view to be too small to be useful - I can barely see some of the elements. The "zoom" button shows only a very small portion of the layout. Is there a way to detach the view so that I can enlarge it?
And is Android Studio's "Design" view different from the "Preview pane" that I see referenced in various forums?
Thanks,
Tom
Not sure how you program, but I much more prefer the text mode with a preview.
There are 2 modes for the xml:
Text
Design
While in Text mode you can:
Enable the preview
Turn it into a floating-resizable window:
You can also hide the bars on the sides and the bottom for example. Simply click on the according category, which always has a number in front (e.g. 1:Project on the left, or 4:Run at the bottom).
Alternatively, you can double-click on the tab of your design view, which will resize it to full-screen.
There's no way to separate the tab to be in a separate window. However, if you zoom in the designer you can then pan around the visualization using the scroll bars. If you want to see the "preview" then at the bottom of the pane, look for the "text" tab. Select that instead of "design" and you'll be taken to the raw text XML. While in text edit mode, you can see a live preview of the layout. It may be collapsed by default, look for "preview" on the right side of the overall window.

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

Split a single screen into two parts + animation

As according to my project requirement, I want to split the screen into two parts like:
I know this thing is available in version 3.0 but I am working on 2.3 so I have to do it manually..
And I want to split the screen as 25% of ListView and 75% of content view..and a single button at the top of the screen..
Now whenever used select a option from listView then automatically the split part slide left and the whole screen will be shown as a content screen only....Now the ListView screen is not visible to the user..
And whenever the user click on the button at the top of the screen..Only then the listview part is shown to user as shown in the above image..
Here what I am thinking is I will take two different layouts and on 1 layout I will display the ListView and on another I will list the content view..But how can I show here the animation of slide left and right whenever user select an option or click the button .
If anyone has some better option,then pls let me know..
[EDIT]: Also I want to show on these screens ????
Thanks..
try to apply animation on those 2 base views with the help of TranslateAnimation class in android.
please refer the following links for more details:
Translate animation code
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/Animation3.html
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.html

Losing screen object auto-focus

I have a GridView displaying buttons to different screens of my app. When this grid screen, the first cell is selected. Is there a way to programmatically have no cells selected when the screen launches? Or do I have to hide the selector?
When this grid screen, the first cell is selected.
That should only be true if the user was using the navigator (D-pad, trackball, etc.) in the previous activity.
Is there a way to programmatically have no cells selected when the screen launches?
Generally, the user determines this based on whether they are in touch mode or not. You could try setSelection(-1) or something, but I would not be surprised if this fails to work.
Or do I have to hide the selector?
I would recommend just following the platform conventions. If the user is using the D-pad or trackball, they probably want to use the D-pad or trackball, and disabling the selector will simply make them frustrated with you and your app. Please see the article I linked to above for more details on touch mode and why it works the way it does.

Categories

Resources