私は、いくつかのボタンを含む線形レイアウトを持っています。ボタンの画像はすべて同じサイズで、属性は同じですが、ボタンは1つです。この1つのボタンのフォントサイズは小さくなります。このボタンを除くすべてのボタンは、まさに私が望むような完璧なラインです。何らかの理由で、小さいフォントのボタンは、他のボタンよりも画面上で少し下に表示されます。私は、余分なスペースを必要とするスペースを必要とするボタンのアイデアの周りに私の頭をラップするのは苦労している。リニアレイアウトのボタン配置
誰かが何を読んでいるかのヒントを教えてくれますか?
EDIT
ここmain.xmlは、(SO、それの一部をフィルタリングのように、すべての重要なものがここにあるようです...)です
<ScrollView android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="300px">
<TextView
android:id="@+id/the_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:typeface="monospace"
android:textSize="9pt"
android:background="@color/paper"
android:paddingLeft="20dp"
android:paddingBottom="20dp"
android:textColor="@color/type"
/>
</ScrollView>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button style="@style/ASR33_button"
android:tag="Y"
android:text="Y"
/>
<Button style="@style/ASR33_button"
android:tag="N"
android:text="N"
/>
<Button style="@style/ASR33_button"
android:tag="E"
android:text="E"
/>
<Button style="@style/ASR33_button"
android:tag="W"
android:text="W"
/>
<Button style="@style/ASR33_button"
android:tag="S"
android:text="S"
/>
<Button style="@style/ASR33_button"
android:tag="F"
android:text="F"
/>
<Button style="@style/ASR33_button"
android:tag="R"
android:text="R"
/>
<Button style="@style/ASR33_button"
android:tag="M"
android:text="M"
/>
<Button style="@style/ASR33_button"
android:tag="T"
android:text="T"
/>
<Button style="@style/ASR33_button"
android:onClick="onEnterButtonClicked"
android:textSize="6pt"
android:text="RE-\nTURN"
/>
<Button style="@style/ASR33_button"
android:tag="U"
android:text="U"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/instructions"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="9pt"
android:paddingLeft="10dp"
android:typeface="normal"
android:text="Commands: (Y)es, (N)o, (N)orth, (E)ast, (W)est, (S)outh, (M)ap, (ST)atus, (Fight), (R)un, (SU)icide. All commands must be followed by RETURN."
/>
</LinearLayout>
ウィンキーなのは、下から2番目のonclickイベントです。スタイルは文字サイズの11ptです。私はそれを使用して(と1文字のボタン名、他のように)それは動作します。しかし、それはASR33の「入力」キーがその上に持っているものではありません。ですから、フォントサイズを6ptに減らすと、奇妙なことが起こります。
スタイルはhereで見ることができます。
もう一度、参考文献やアイデアを読んでください。検索する単語が1つまたは2つある場合は、わかります。それはあなたが知っていないかを知るのは難しい...
解決はアヌラーグは右のそれを持っている
、以下の彼の答えを参照してください。ここでは、更新のLinearLayoutの抜粋です:
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false">
xmlレイアウトを追加します。 – Luksprog
「」の中のコンポーネントを「」タグに追加するのはどうですか? –
deadfish
@Luksprog XMLが追加されました –