親線形レイアウトでは奇妙な問題があります。高さはfill_parentに設定されていますが、コンテンツをラップする意図はあるようです。それは、グラフィックレイアウトビューで、それが見えるようにしようとしている方法を示していますが、まだエミュレータで何をすべきかをまだ示していませんか?ここ親の線形レイアウトがfill_parentを持っていても画面全体を占めていない
は私のコードです:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/title_color_dark_transparent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical|center_horizontal|center"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="5dp"
android:orientation="vertical"
android:paddingTop="5dp" >
<EditText
android:id="@+id/menutweetedittext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/edit_text"
android:gravity="top"
android:hint="@string/edittext_hint"
android:inputType="textCapSentences|textMultiLine|textAutoCorrect|textAutoComplete"
android:lines="4"
android:textAppearance="@style/TextAppearance.EditText" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="right"
android:orientation="horizontal" >
<TextView
android:id="@+id/menucharactersremaining"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/characters"
android:textColor="#FFFFFF"
android:textSize="20dp" />
<Button
android:id="@+id/menuposttweetbutton"
style="@style/TextAppearance.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:background="@drawable/button_background"
android:onClick="posttweetbuttonClicked"
android:text="@string/postbuttonstext"
android:textSize="15dp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
<com.google.ads.AdView
android:id="@+id/menuadView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="a14f5be094d0328"
ads:loadAdOnCreate="true" />
</LinearLayout>
複数のLinearLayoutの子があります。どちらに問題がありますか? –
LinearLayoutsのどれですか?それはフルスクリーンではありませんか? – zapl
親、私は画面全体を占める最初のものの背景色を設定しました。代わりに –