I want to make a layout like S Health (Right side of picture)
To me it seems like the layout is an ActionBar with a TabHost and a ScrollView.
The ScrollView then seems to be a vertical linear layout with a SurfaceView at the top.
My question is, am I right in thinking that I can use a SurfaceView to create a chart similar to the one pictured and then place other views under for the text and graphs?
How can a lock the ScrollView from moving up and down if the user starts by moving the chart horizontally?
Related
I am finding it impossible to produce my desired layout in android studio.
I have a very simple gimmick drawing app and I'm trying to add a colour palette as a gridView. The palette is too big to not overlap the canvas, so I'd like to show it while the colour button is pressed so you can swipe to your desired colour.
Positioning the palette gridview is proving difficult. I would like it overlapping the canvas, above and horizontally centred with the 'pencil' colour selection button. I've tried two methods:
Having the gridview exist in the top-level relative layout, so it can easily overlap the canvas. This is as per the screenshot. However, I can't position it relative to the button here because the button is in a different layout.
Having the relative layout containing button and palette contained in the control view, as shown in the tree diagram. However, the palette won't draw outside its parent layout, and the relativeview can't overlap the canvas because it's in the linear layout for controls which goes beneath the canvas.
It seems like such a trivial thing - is it really impossible? Should I abandon all pretense of linear layouts and place everything in one relative layout?
Tree diagram
I have a layout looking like this.
The bottom part are the tabs and this is one of the tabs. It has a LinerLayout on the left and ListView on the right side. The list view goes beyond screen height and elements are scrollable.
Is it possible to locate red-colored LayoutView over these element at this specific location without much redesigning a layout?
I want to create layout having logo (small logo than screen) on the centre of the screen (horizontally & vertically) and on the top of the centred logo, I want to have a full screen (fill_parent) LinearLayout having ListView in it.
Want to keep ListView little transparent to keep my logo visible, looks like a watermark.
Can any one please tell me that what could be the XML for that?
for logo to be at centre use android:gravity="center" and also set opacity="translucent" and use it in a frame layout and also use overlay concept.
You can also check this other post.
Use Framelayout,
http://developer.android.com/guide/topics/ui/layout-objects.html
You can even use relative layout to overlap views.
I need to make an android layout like this one.
tile background all over the screen.
top menu which, overlays the background ( note the shadow ).
some sort of a table with text options, maybe pictures, which can be scrolled up and down.
bottom menu, which appears by sliding up after a menu button is hit.
What kind of layout elements do you think I should use for that?
Thanks!
I think you should first learn about the Android Layout and XML layout design, then you can easily prepare this layout as well.
Relative Layout will be the better layout as compare to other layouts like Linear Layout and Table Layout.
To display middle part that is showing textual description may contains ListView (ListView because as you have mentioned Text Options should scroll up and down), but it depends on your requirement.
The RelativeLayout is the most flexible, and I think you can make all this with a minimal hierarchy view depth.
My approach would be to use a RelativeLayout. The Top Menu bar could be a custom class which extends a LinearLayout and this can be used in the RelativeLayout (in fact in any screen you have to provide UI consistency). Similarly, the bottom menu would be a custom control containing the appropriate animations. The rest of the screen would be contained in a ScrollView, possibly containing a TableLayout. I have something very similar using a MapView in the main screen and it works fine.
I am trying to create an UI just like the attached image!
How do we create these types of UI? Is it a ListView? And how do we get the arrow button on the right hand side? How should I start with such kind of layouts?
You can achieve that with a LinearLayout too.
Have that LinearLayouts orientation be vertical. Create such list items (it isn't related to ListView) using RelativeLayout.
Have the icon be an ImageView aligned to its parent left and vertically centered, the text would be a normal TextView which is to the right of that icon and vertically centered as well and finally another ImageView but this time aligned to its parents right and vertically centered.
These is the receipt.
It's a ListView, you should learn how to write your own ArrayAdapter and returns in the getView method the View you want to be each row of the ListView.
AnDroidDraw lets you create the layout online and then later download it on your device. http://www.droiddraw.org/
Create appropriate custom ArrayAdapter for this layout.