現在、1つのアンドロイドアプリケーションを作成しています。タイトルバーのすべてのコンテンツはwindow_title.xmlに保持されていますので、LinearLayoutが設定されています:paddingLeft = "5dip"そして今、私はこのtitleBrightの右側にimageViewをロードする必要があります。私はこのpaddingLeftを上書きすることができます。左にテキストとイメージが必要ですが、右にも必要です。ここでAndroid上のLinearLayoutにPaddingLeftを上書きする
は、現在のxmlです:私が正しくあなたの質問を理解していれば
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical"
android:paddingLeft="5dip"
android:background="#222222">
<ImageView
android:id="@+id/header"
android:src="@drawable/header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:text="TextTexast"
android:textSize="10pt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="5dip"
android:textColor="#F7F7F7"
/>
</LinearLayout>
そのように試してみてください。しかし、同じこと。ここにあなたを助ける写真があります:http://shrani.si/f/k/r5/2y9AMubw/img.pngですから、この灰色の形を左隅から右隅に移動する必要があります。そして、私はLinearLayout paddingRightでImageViewで指定した内容を無視しています。 – HyperX
あなたが@HyperXのために働いていない場合、なぜそれを受け入れられた答えとしてマークしましたか? – StackOverflowed