2016-08-20 3 views
0

マーキングのレイアウトに問題がありますが、これはコードのxmlにありますが、buttonBarは表示されていません。 私の問題を解決してください。表示されていない項目のレイアウトを配置するbuttonBar

これは私のコードです:

ButtonBarには、画面の一番下にあったことを確認する方法
<ImageView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/imageQuote" 
    android:layout_marginTop="10dp" 
    android:layout_centerHorizontal="true" /> 


<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textAppearance="?android:attr/textAppearanceMedium" 
    android:text="Description" 
    android:id="@+id/descriptionOfQuote" 
    android:layout_below="@+id/imageQuote" 
    android:layout_marginTop="10dp" 
    android:layout_centerHorizontal="true" 
    android:foregroundGravity="center" 
    android:textSize="22dp"/> 

<LinearLayout 
    android:id="@+id/buttonBar" 
    android:layout_marginBottom="1dp" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:foregroundGravity="center" 
    android:gravity="bottom" 
    > 
    <ImageButton 
     android:layout_width="85dp" 
     android:layout_height="match_parent" 
     android:id="@+id/arrow_left" 
     android:src="@drawable/arrow_left" 
     android:background="?android:selectableItemBackground"/> 
    <ImageButton 
     android:layout_width="85dp" 
     android:layout_height="match_parent" 
     android:id="@+id/btn_copy" 
     android:src="@drawable/copy" 
     android:background="?android:selectableItemBackground"/> 

    <ImageButton 
     android:layout_width="85dp" 
     android:layout_height="match_parent" 
     android:id="@+id/btn_share" 
     android:src="@drawable/share" 
     android:background="?android:selectableItemBackground"/> 

    <ImageButton 
     android:layout_width="85dp" 
     android:layout_height="match_parent" 
     android:id="@+id/arrow_right" 
     android:src="@drawable/arrow_right" 
     android:background="?android:selectableItemBackground"/> 

</LinearLayout> 

enter image description here

? LinearLayoutの向きを水平にする

1):

+0

何を達成したいのですか? 2つのボタンバーが必要ないと言っていますか? –

+0

私はボタンにしたいバールは底にあった。私のコードではありますが、画面にはありません。 –

答えて

0

私はあなたの問題を解決することができる2つの手がかりを持って

<LinearLayout 
android:id="@+id/buttonBar" 
android:layout_marginBottom="1dp" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:layout_alignParentBottom="true" 
android:foregroundGravity="center" 
android:gravity="bottom" 
android:orientation="horizontal" 
> 

2)私はわからないが、ButtonBarコントロールの子の高さに問題がある可能性があり、幅として設定してみてください:

<ImageButton 
    android:layout_width="85dp" 
    android:layout_height="85dp" 
    android:id="@+id/arrow_left" 
    android:src="@drawable/arrow_left" 
    android:background="?android:selectableItemBackground"/> 

私は実際に私の答えが正しいかどうAndroidのメーカーは確認する必要はありません、そのために残念:(

+0

残念ながら、この解決策は私を助けません。 –

関連する問題