Ich verwende eine EditText
. aber der Cursor beginnt in der Mitte des Bildschirms. Wenn ich wrap_content
in der XML-Datei verwende, kann ich die EditText
überhaupt nicht sehen (es ist ausgeblendet).Wie man editText Cursor bewegt?
Ich möchte, dass der Cursor und der Eingabetext oben in meiner Symbolleiste beginnen. Irgendwelche Ideen?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_settings_contact_us"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="airjaw.butterflyandroid.SettingsContactUsActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/editText"
/>
<Button
android:text="Send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="15dp"
android:id="@+id/submitButton"
android:onClick="submitButtonPressed"/>
</RelativeLayout>
Wie
füge Sie das komplette Layout hinzu –