In Android Studio, I've seen a <View />
node and this has all of Widget's attributes. I'm curious, what's this node and how could I use it?
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/material_cyan_200"
/>
Let me illustrate as per your Example,you have a View Tag as in
<View
android:id="@+id/myview"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/material_cyan_200"
/>
Which will draw an Horizontal line of Color grey
,
if suppose you need to make it invisible
or some other action,u can do it in .java
file as in
View v=findViewById(R.id.myview);
v.setVisible(View.GONE); //will remove View from your UI
An excellent general explanation has been already done by rajan ks.
If you want to know instant usage meaning of the code, I think it would be a thin horizontal border line which colored with @color/material_cyan_200
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With