eine erweiterte Symbolleiste in Android erstellen Ich versuche, eine Symbolleiste in Android zu erstellen, die 2x in Höhe der normalen Symbolleiste ist, und ein EditText
in dem unteren Hälfte Abschnitt aufweist.Wie mit einem EditText am unteren
Derzeit habe ich den XML-Code (beachten Sie die android:layout_height="128dp"
):
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:title="Messages"
android:titleTextColor="@color/windowBackground"
android:background="@color/buttonBackground"
android:layout_height="128dp"
android:layout_width="match_parent"
android:minHeight="?android:attr/actionBarSize"
android:gravity="bottom" />
<fragment
android:id="@+id/no_activity_fragment"
class="com.ohmd.ohmd.ui.main.MainActivityListFragment"
android:name="com.ohmd.ohmd.ui.main.MainActivityListFragment"
android:layout_below="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="fill_parent"/>
</RelativeLayout>
Dies ist, wie es aussieht (ohne EditText
noch):
So ein paar Probleme, die ich m aufgeklebt:
(a) Wie kann ich die „Messa bekommen Wenn die Höhe auf
"?android:attr/actionBarSize"
eingestellt ist?(b) Aftter den Titel nach oben bewegt, wie kann ich eine
EditText
Ansicht in der unteren Hälfte hinzufügen?
Dies ist, was ich hoffe, acheive: Nun