Ich habe einen Bildschirm mit mehreren Eingabefeldern und zwei an der Unterseite zentrierten Tasten auf dem Telefon sieht es so aus:.Bildschirmlayout in Tablet gestört. Funktioniert auf Tablet-Emulator und auf 5" Android-Handy
Phone view (looks same on tablet emulator)
Aber auf Tablet sieht es aus wie wie folgt:.
ich eine Zoom-Version benötigen, wie es in dem Telefon sieht aus wie alle Ansichten (textinputlayout, Knöpfe, font-size, hint) sollte alles gleich aussehen, aber größer auf großen Bildschirmgrößen Es sollte nur auf großen Bildschirm herauszoomen und konsistent mit dem Aussehen auf dem Handy sein.
Gibt es eine Möglichkeit, dies zu erreichen?
Ich habe alle Dimensionen in dp gegeben und LinearLayout als ViewGroup verwendet. minSDKVersion ist 19.
Mein Code ist wie unten eingefügt:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/header_left_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="60dp"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:weightSum="100.0"
tools:context=".OutletDetailsActivity"
tools:showIn="@layout/activity_outlet_details"
android:focusable="true"
android:focusableInTouchMode="true"
android:background="@drawable/app_bg">
<com.admin.view.CustomFontTextView
android:id="@+id/registerOutletHeader"
android:layout_weight="6.0"
android:layout_gravity="center"
style="@style/screenHeader"
/>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollViewRegisterBox"
android:layout_width="wrap_content"
android:layout_weight="75.0"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_gravity="center"
android:layout_height="0dp"
android:scrollbarSize="3dp"
android:scrollbarThumbVertical="@color/floating_line">
<LinearLayout
android:layout_width="300dp"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:orientation="vertical"
android:paddingTop="@dimen/register_box_top_margin"
android:id="@+id/registerContainerBox"
>
<android.support.design.widget.TextInputLayout
android:id="@+id/inputOutletNameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp">
<com.admin.view.CustomFontEditText
android:id="@+id/inputOutletNameText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/outlet_name"
android:inputType="text"
android:theme="@style/inputText"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/inputaddressLine1Layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="15dp">
<com.admin.view.CustomFontEditText
android:id="@+id/inputaddressLine1Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/address_line1"
android:inputType="textPostalAddress"
android:theme="@style/inputText"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/inputaddressLine2Layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="15dp">
<com.admin.view.CustomFontEditText
android:id="@+id/inputaddressLine2Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/address_line2"
android:inputType="textPostalAddress"
android:theme="@style/inputText"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/inputPinCodeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="15dp">
<com.admin.view.CustomFontEditText
android:id="@+id/inputPinCodeText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/pin_code"
android:inputType="number"
android:maxLength="6"
android:theme="@style/inputText" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/inputEmailLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="15dp">
<com.admin.view.CustomFontEditText
android:id="@+id/inputEmailText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/email_id"
android:inputType="textEmailAddress"
android:theme="@style/inputText"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/inputPhoneNumberLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="15dp">
<com.admin.view.CustomFontEditText
android:id="@+id/inputPhoneNumberText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/mobile_number"
android:inputType="number"
android:maxLength="10"
android:theme="@style/inputText"/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="5dp"
android:layout_weight="19.0"
android:weightSum="6">
<com.admin.view.CustomFontButton
android:id="@+id/reset_button"
style="@style/formButton"
android:layout_marginLeft="60dp"
android:layout_weight="1"
android:text="Reset"
android:layout_gravity="center"
/>
<com.admin.view.CustomFontButton
android:id="@+id/registerOutletNextButton"
style="@style/formButton"
android:layout_marginLeft="30dp"
android:layout_weight="1"
android:text="Register"
android:layout_gravity="center" />
</LinearLayout>`enter code here`
</LinearLayout>