Layout for button bar in Material style

0

I'm trying to create a button bar at the bottom of the screen ("Cancel" and "Save" buttons similar to the one used by Google Drive:

However,nowhereintheMaterialguidelinesdidIfindanythingpertainingtothatbar.Thereisnospecificationofheight,margins,etc.TheclosestIfoundwas this , but this link does not include fixed bars at the bottom of the screen.

So far, I have this result:

However,itseemssimplywrong.Itdoesnotappeartobethesameheight,thepositioningofthebuttonsisdifferentandIstillhavenotbeenabletoputthedividinglineatthetop.ThisismyXML:

<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context="com.renanlazarotto.fserv2.activities.NovoChamadoActivity">

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/chamados_toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/ciano_500"
    app:theme="@style/Theme.AppCompat"
    app:popupTheme="@style/Theme.AppCompat.Light" />

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/novo_scroll"
    android:layout_below="@+id/chamados_toolbar"
    android:layout_above="@+id/novo_botoes"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true">

    ...
</ScrollView>

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:id="@+id/novo_botoes"
    android:gravity="right"
    android:paddingRight="16dp"
    android:layout_alignParentBottom="true"
    android:paddingLeft="16dp"
    android:layout_marginTop="24dp">

    <Button
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        android:text="@string/novo_botao_cancelar"
        android:id="@+id/novo_botao_cancelar"
        style="?android:attr/borderlessButtonStyle"
        android:minWidth="64dp"
        android:paddingLeft="8dp"
        android:paddingRight="8dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"  />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        android:text="@string/novo_botao_abrir"
        android:id="@+id/novo_botao_abrir"
        style="?android:attr/borderlessButtonStyle"
        android:minWidth="64dp"
        android:paddingLeft="8dp"
        android:paddingRight="8dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"
        android:textColor="@color/ciano_500" />
</LinearLayout>

The item in question is the last LinearLayout. How can I improve this layout so that it looks more like the Google Drive image?

    
asked by anonymous 10.01.2015 / 15:15

1 answer

1

I believe the bar it refers to is the area of action of a Dialog . I believe that this Google Drive screen is a Dialog in Full Screen .

For Dialog in FullScreen they give another layout of actions, but this form of Google Drive does not contradict the Guidelines. >

The link to Dialogs in Fullscreen is link (section of Full-screen dialogs )

The metrics for this area of action buttons are as follows:

More details at: link

References:

10.01.2015 / 15:54