小编Clo*_*all的帖子

在Android选项卡布局段落中创建线分隔线

嘿所有,首先发布和Android编程中的菜鸟,但愿意学习!基本上我从这里采用了标签布局的Google样本

我发现这个方法非常容易在每个标签中创建带有文本的标签,但我试图使其在选择标签时,我希望下面列出的文本用分界线分隔.所以每一段之间都有一条线,但是我在这方面遇到了麻烦.这是我到目前为止:main.xml:

<?xml version="1.0" encoding="utf-8"?>
Run Code Online (Sandbox Code Playgroud)

        <TableRow>
            <TextView
            android:id="@+id/textview1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:text="this is the FIRST line of the 1st tab" />
            <TextView
            android:id="@+id/textview1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:text="this is the SECOND line of the 1st tab" />
            </TableRow>
            <View
    android:layout_height="2dip"
    android:background="#FF909090" />

    <TableRow>
        <TextView 
            android:id="@+id/textview2"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" 
            android:text="this is First line of the 2nd tab" />
            </TableRow>
            <View
    android:layout_height="2dip"
    android:background="#FF909090" />
            <View
    android:layout_height="2dip"
    android:background="#FF909090" /> 
         <TextView 
            android:id="@+id/textview3"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" 
            android:text="this is the First line of the 3rd tab" />
         <TextView 
            android:id="@+id/textview4" …
Run Code Online (Sandbox Code Playgroud)

layout tabs android line divide

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

标签 统计

android ×1

divide ×1

layout ×1

line ×1

tabs ×1