EditText with custom shape (drawable)

Pada kali ini saya mau share lirik lagu terbaru EditText with custom shape (drawable). Dan berjumpa lagi dengan saya di blog Free apk androiddan bagi teman teman yang ingin blog ini update terus silahkan berkomentar ya . .. ^_^ Baca juga tentang postingan saya sebelumnya :

To create EditText with our own shape, create a drawable XML to define our custom shape:

res/drawable/myshape.xml
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:padding="10dp">
<solid android:color="#505050"/>
<corners
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>


Reference my shape in layout xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_margin="20dp"
android:orientation="vertical"
tools:context="com.blogspot.android_er.androidedittextchanged.MainActivity">

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:autoLink="web"
android:text="http://android-er.blogspot.com/"
android:textStyle="bold"/>

<EditText
android:id="@+id/edittext1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="normal EditText"/>
<EditText
android:id="@+id/edittext2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="EditText with custom shape"
android:textColorHint="#B0B0B0"
android:textColor="#F0F0F0"
android:background="@drawable/myshape" />

</LinearLayout>


Sekian Lirik lagu yang dapat saya bagikan tentang EditText with custom shape (drawable)

. biar tetap update blognya silahkan berkomentar Di Free apk android sekian dari saya permalink untuk post kali ini adalah http://apkgameon.blogspot.com/2017/07/edittext-with-custom-shape-drawable.html

CONVERSATION

0 komentar:

Post a Comment

Back
to top