Gibt es jemanden, der mir helfen kann, herauszufinden, was mit meinem Code nicht stimmt? Die Vorschau ist wie erwartet. aber Problem tritt auf, gerade als ich sie im realen Gerät prüfte. Ich fügte Admob Fahne Anzeige an der Unterseite hinzu. bevor es hinzugefügt wurde, war es völlig ok. Aber jetzt ist es nicht richtig ausgerichtet. Was ist mein Fehler oder was soll ich tun?Tastenausrichtung funktioniert nicht am echten Gerät Android
Mein XML-Code ist:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:background="#FFFFFF"
android:orientation="vertical">
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/scrollView8"
android:layout_alignParentTop="true"
android:layout_above="@+id/ll1"
android:fillViewport="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp" >
<TextView
android:id="@+id/textLink"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/description_product"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="15sp" />
<TextView
android:id="@+id/result_field_product"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_alignWithParentIfMissing="true"
android:layout_centerInParent="false"
android:layout_marginTop="20dp"
android:gravity="center_vertical|center_horizontal"
android:text="Example application"
android:textSize="16sp"
android:textIsSelectable="true" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/ll1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_above="@+id/adView"
android:orientation="horizontal"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
<Button
android:id="@+id/btnProceed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/button_fullwidth"
android:padding="5dp"
android:text="@string/choose_action"
android:textColor="@android:color/white" />
<view
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="1"/>
<Button
android:id="@+id/btnCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/button_fullwidth"
android:padding="5dp"
android:text="@string/abort_action"
android:textColor="@android:color/white" />
</LinearLayout>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@color/colorAccent"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_home_footer">
</com.google.android.gms.ads.AdView>
Hier Meine eine Taste ausgerichtet ist, aber eine andere ist nicht, es ist place.How kann ich es beheben?
Was wollen Sie mit Knopf ausrichten? – KeLiuyue
Ich möchte nur btnProceed & btnCancel in der gleichen Zeile machen. –
Konnten Sie das Bild zeigen, das Sie jetzt erhalten? – KeLiuyue