How to Add One Side Left Border in Android using XML

How to Add One Side Left Border in Android using XML - Hello friend inabnomaniiyaha, In the article that you read this time with the title How to Add One Side Left Border in Android using XML, we have prepared this article well for you to read and take information in it. hopefully the contents of the post Artikel android-example,what we write you can understand. Alright, happy reading.

Judul : How to Add One Side Left Border in Android using XML
link : How to Add One Side Left Border in Android using XML

Baca juga


How to Add One Side Left Border in Android using XML

How to Add One Side Left Border in Android using XML

How to Add One Side Left Border in Android using XML

activity_main.xml

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

<RelativeLayout 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:background="#fff"

    tools:context="com.android_examples.onesidebordertextview_android_examplescom.MainActivity">


    <TextView

        android:layout_width="fill_parent"

        android:layout_height="100dp"

        android:text="This is Sample TextView Text."

        android:background="@drawable/text_style"

        android:gravity="center"

        android:layout_centerHorizontal="true"

        android:layout_centerVertical="true"

        android:layout_margin="12dp"

        android:textSize="20dp"

        android:textColor="#000"

         />


</RelativeLayout>

text_style.xml

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


<layer-list xmlns:android="http://schemas.android.com/apk/res/android">


    <item>

        <shape android:shape="rectangle">

            <solid android:color="#F44336"/>

        </shape>

    </item>


    <item android:left="4dp">

        <shape android:shape="rectangle">

            <solid android:color="#FFEB3B"/>

        </shape>

    </item>


</layer-list>



That's the articleHow to Add One Side Left Border in Android using XML

That's it for the article How to Add One Side Left Border in Android using XML this time, hopefully can be useful for all of you. well, see you in another article post.

You are now reading the articleHow to Add One Side Left Border in Android using XML with link addresshttps://inabnonapudyawanabing.blogspot.com/2021/05/how-to-add-one-side-left-border-in.html

0 Response to "How to Add One Side Left Border in Android using XML"

Post a Comment

Tips Tricks for Android Phone

Tips & Tricks for Android Phone is a free android app and Collection of Tips and Tricks related to using your android mobile device lik...