0

私はABSを使用しています。これが私のカスタムビューです

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="vertical" >

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="1dp"
    android:background="#F0F0F0"
    android:paddingBottom="10dp" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="35dp"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="5dp"
        android:src="@drawable/list" />

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_marginBottom="35dp"
        android:layout_marginRight="5dp"
        android:layout_marginTop="5dp"
        android:src="@drawable/create_dcyde" />

</RelativeLayout>

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#000000" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="1dp"
        android:layout_weight="1"
        android:background="#F0F0F0"
        android:gravity="center_horizontal"
        android:text="TextView"
        android:textColor="#000000" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:background="#F0F0F0"
        android:gravity="center_horizontal"
        android:text="TextView"
        android:textColor="#000000" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="1dp"
        android:layout_weight="1"
        android:background="#F0F0F0"
        android:gravity="center_horizontal"
        android:text="TextView"
        android:textColor="#000000" />

</LinearLayout>

そして、ここに私のonCreateがあります

View customNav = LayoutInflater.from(this).inflate(R.layout.custom_view, null); 
getSupportActionBar().setCustomView(customNav);
getSupportActionBar().setDisplayShowCustomEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);

RelativeLayout の下部パディングを 10 dp に減らすと、TextView が部分的に表示されます。しかし、20 dp で TxtView は消えます。ActionBar の高さ制限を超えていますか?

スクリーンショット

4

0 に答える 0