【问题标题】:<View> code not making changes. not appearing View<View> 代码未进行更改。未出现查看
【发布时间】:2017-08-19 09:18:59
【问题描述】:

&lt;View&gt;没有显示,它没有做任何改变。 &lt;View&gt; 是标签不起作用。 我设置了一种颜色,但它再次不起作用, 为什么这是隐藏的? 我该怎么办? 请帮帮我....

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:app="http://schemas.android.com/apk/res-auto"
                xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                tools:context="com.example.android.courtcounter.MainActivity">

    <View android:id="@+id/view"
          android:layout_width="1dp"
          android:layout_height="match_parent"
          android:textColor="@android:color/black"/>

</RelativeLayout>

doesn't showing ... code's effect

【问题讨论】:

    标签: android xml view line show


    【解决方案1】:

    试试下面的代码查看;

            <View
            android:id="@+id/view"
            android:layout_width="match_parent"
            android:layout_height="3dp"
            android:background="@android:color/black" />
    

    【讨论】:

    • ThankYou Vishal.... 我的代码也是正确的,但我的模拟器有问题。当我选择另一个模拟器时它可以正常工作
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-02-25
    • 1970-01-01
    • 2020-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-28
    相关资源
    最近更新 更多