相关疑难解决方法(0)

ListView中的中心文本项

我怎么能水平居中对齐的文本项ListView在我的Layout
老实说,在问这样一个基本问题之前,我用谷歌搜索了至少一个小时.

谢谢.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <EditText
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:hint="Remind..." />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:baselineAligned="false"
        android:orientation="horizontal" >

        <ListView
            android:id="@+id/listviewTimeInterval"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:scrollbars="none" />

         <-- . . . --/>
         <-- more lists of the same kind--/>
         <-- . . .--/>

    </LinearLayout>

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

android android-widget android-layout

5
推荐指数
2
解决办法
2万
查看次数

标签 统计

android ×1

android-layout ×1

android-widget ×1