ダイアログ フラグメントの oncreate ダイアログ メソッドでアラート ダイアログを作成しました。アラート ダイアログにアレイ アダプターを入力しています。私の問題は、警告ダイアログのサイズがアダプターのテキストによって異なることです。アラート ダイアログをデフォルト サイズに固定したい。助けてください。
1 に答える
0
place the textview in scrollview with fixed height.
they are two methods to do that
1)by using the ScrollView
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res /android">
<ScrollView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1">
<TextView android:id="@+id/TextView01" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Venkata Reddy,"
</ScrollView>
</LinearLayout>
2メソッド
<TextView
android:text="Single-line text view that scrolls automatically if the text is too long to fit in the widget"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
いずれかの方法を使用してください...
于 2013-02-06T07:31:28.850 に答える