【问题标题】:TableLayout and borders in XMLXML 中的 TableLayout 和边框
【发布时间】:2014-03-17 22:33:10
【问题描述】:

如何在 XML 中使用 TableLayout 创建一个表格,并同时拥有深色边框和透明背景?有方法吗?感谢您的帮助。

【问题讨论】:

    标签: android


    【解决方案1】:

    这是一个 TableLayout 的示例:

    <?xml version="1.0" encoding="utf-8"?>
    

    <!-- 2 columns -->
    <TableRow
        android:id="@+id/tableRow1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="5dip" >
    
        <TextView
            android:id="@+id/textView1"
            android:text="Column 1" />
    </TableRow>
    

    深色边框是通过制作形状来实现的,例如:Create borders on a android view in drawable xml, on 3 sides?

    我不确定您所说的透明背景是什么意思。它是黑色或白色背景,还是可以看到主页启动器视图的背景?

    【讨论】:

    • 我希望看到透明度占应用背景的百分比
    • 应用程序背后需要什么才能使其透明化?
    • 我希望 LinearLayout 的背景即使在 TableLayout 前面也能以百分比显示
    • 那么你想让LinearLayout在TableLayout后面可见吗?
    • 是的,但我也想看看 TableLayout 的边框
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-18
    • 1970-01-01
    • 1970-01-01
    • 2011-08-28
    • 1970-01-01
    相关资源
    最近更新 更多