How to create bottom menu like gmail android - android

I am not quite sure what kind of layout Gmail is using in Android.
I suppose they use a floating ViewGroup.
But for the menu on the top and bottom I really need somebody point me how to make that.

I suggest you to use the Sherlock ActionBar:
http://actionbarsherlock.com/
This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.
In the sample app you can find the code to achieve what you are looking for under "Split Action Items". The idea is that you add actions from the menu as usual, but writting the following line in your manifest activity:
android:uiOptions="splitActionBarWhenNarrow"

You can create a menu which will sit on the bottom of a listview using the <RelativeLayout> tag like so
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ListView
android:layout_height="wrap_content"
android:layout_width="fill_parent" android:id="#android:id/list"
android:listSelector="#android:color/transparent"
android:layout_above="#+id/footer" />
<include android:id="#+id/footer" android:layout_height="wrap_content"
layout="#layout/mymenu" android:layout_width="fill_parent"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" >
</include>
</RelativeLayout>
mymenu will contain a linearlayout with something like a tablelayout with a few rows (which can be textviews, imageviews, etc.) The table will sit at the bottom of your screen and the listview will be in a frame which starts at the top of the screen and ends at the top of the menu (no overlap)
You could also do the same for the top of the screen by simply having the listview say layout_below="#+id/header" instead of layout_above"#+id/footer" (or do both!)

This is covered on android. You have to implement a "split action bar". Note that it works in potrait view and disappears when you switch to landscape.
Android Action Bar

It looks like a custom ActionBar implementation. If you put icons in a normal ActionBar and there is not enough space to display them, android creates a bottom bar on its own and display the icons there.
I had a similar application and I chose to put my own custom bar there instead of implementing ActionBar

Related

How to make Seek bar in Slide menu?

I'm a student making an application using an android studio for practice. I want to make seek bar in basic slide menu, which android studio provides as navigation drawer. I searched about it but couldn't find it. If the answer already exists, I apologise. Pretty hard to search by English...
Is there a way to create seek bar in slide menu so users can edit the value? For instance, users can control size or opacity of pen directly by editing the value of seek bar in slide menu. I made an example image. Thanks for reading.
Modify your NavigationView to accommodate android Views instead of menu.So that you can customize the entire Navigation Drawer Menu.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="#layout/nav_header_main" />
<ListView
android:id="#+id/lst_menu_items"
android:layout_width="match_parent"
android:layout_height="0dp"
android:entries="#array/sports_array"
android:layout_weight="1" />
</LinearLayout>
</android.support.design.widget.NavigationView>

Navigation Drawer Notification Icon without Actionbar

In my application I do not want to use the actionbar or toolbar as my app is fairly simplistic and having one of those two would clutter my application. I know when using an actionbar with a navigation drawer there is an icon on the top left to show the drawer exists; however, I want a small notification icon in the middle of the screen to show that the drawer exists. Perhaps a clear arrow? Is this possible? I can not find any documentation on how I would approach doing this. Thank you.
Edit:
I do not want to use ANY type of action bar
Update 2
You can wrap your indicator in a RelativeLayout.
<RelativeLayout android:layout_width="match_parent"
android:layout_width="match_parent"/>
<MyIndicator
android:id="#+id/indicator"
android:layout_width="match_parent"
android:layout_width="match_parent"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"/>
<OtherView android:layout_width="match_parent"
android:layout_width="match_parent"/>
</RelativeLayout>
Update
Use FloatingActionButton from design library.
If you use a toolbar you can set a custom icon. Here is another post doing something like that: Custom icon in Android toolbar
You can use custom action bar in your app that can be customized according to your need.
Refer this link Custom Action Bar

How add custom view top of the android action bar

How to add a custom view top the android navigation bar like above image. when user click on the action bar need to push the main content down and add the custom layout top of the action bar.please how to accomplish this any one suggest a solution
Thanks
Rahul
An easy solution would be to use those views in the actual ActionBar like this: http://developer.android.com/guide/topics/ui/actionbar.html#ActionView. And then take all your layouts and put them inside a RelativeLayout and set their android:layout_below="" to a layout that corresponds to the ActionBar you want to use. So in a step by step way:
Create an action_bar.xml that has the items you want your actionbar to have (ImageViews or Buttons, w/e)
Include this layout in all the Layouts you will use (or in your main layout if you're using Fragments to display content).Like this:
<include layout="#layout/action_bar"
android:id="#+id/action_bar"
android: ... />
Make your Layout position itself below this layout (Using a FrameLayout for example)
<FrameLayout
android:id="#+id/content_frame"
android:layout_below="#+id/action_bar"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
Include the ActionViews (Spinner and tabs) in the ActionBar like it's taught in the link up there.

Position ActionBar in middle Android(Sherlock Implementation)

I have a custom action bar for which I have used Sherlock Implementation and I tend to find that the tab widget is placed at the top every time rather than in the middle.
I have tried the following in XML but it seems to set the action bar at the top :
<TabWidget
android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_alignParentBottom="true"
></TabWidget>
I want it somewhere in the middle. I have provided with an example image below :
As you can clearly see that the action bar is located at the top which is not what I want. So,how do I place it after the Followers list. Any ideas ??
Is the parent View of you TabWidget a LinearLayout? If so, you may try your luck with a RelativeLayout.

titlebar bottom

i read this tutorial how to create a custom-titlebar.
http://www.anddev.org/view-layout-resource-problems-f27/my-own-titlebar-backbutton-like-on-the-iphone-t4591.html
works fine BUT:
is it possible to add this bar not as a titlebar on the top but on the bottom?
You can always create your own TextView and place it in an absolute position on a layout (see AbsoluteLayout here) but I would recommend against this as it breaks from the normal user interface standards and could be confusing to users. In addition if you have scrolling in your layout the positioning would become more complex. As far as I know there is no built-in way of moving the title bar.
Just an idea.
You can turn off the title bar and add something like title bar to the bottom of all your layouts:
<LinearLayout
android:orientation="vertical"
android:width="fill_parent"
android:height="fill_parent">
<LinearLayout
android:id="#+id/layout_container"
android:weight="1"
android:height="0dp"
android:width="fill_parent">
...
</LinearLayout>
<LinearLayout
androdi:id="#+id/titlebar"
android:height="wrap_content"
android:width="fill_parent">
...
</LinearLayout>
</LinearLayout>
But i've never seen a title bar at the bottom.

Categories

Resources