Skip to main content

Computer

               Using the Code

Create an XML file with the name
" EditTextStyle.xml " in the drawable folder in your
project and write the following code:

<?xml version="1.0"
encoding ="utf-8" ?>
< shape xmlns:android ="http://
schemas.android.com/apk/res/android"
android:thickness ="0dp"
android:shape ="rectangle">
< stroke android:width ="3dp"
android:color ="#4799E8"/>
< corners android:radius ="5dp" />
< gradient
android:startColor="#C8C8C8"
android:endColor ="#FFFFFF"
android:type="linear"
android:angle ="270"/>
</ shape >

Now add the following attribute to your
EditText :


< EditText
android:id ="@+id/
inputSearchEditText"
android:layout_marginLeft ="15dp"
android:layout_marginTop ="15dp"
android:layout_marginBottom ="20dp"
android:layout_marginRight ="15dp"
android:layout_centerVertical ="true"
android:layout_width ="match_parent"
android:layout_height ="wrap_content"
android:ellipsize ="start"
android:gravity ="center"
android:hint ="Search
text"
android:inputType ="text"
android:background ="@drawable/
EditTextStyle" />

Comments

Popular Post

Upsc

बेंगलुरु शहर निगम ने बेंगलुरु के निवासियों के लिए श्वसन स्वास्थ्य की जांच करने की आवश्यकता पर जागरूकता पैदा करने के लिए प्राणवायु कार्यक्रम शुरू किया है। इसके बारे में: ...

India's daily top news

&#128478;Today's Top News 05.05.2020 1. प्रधानमंत्री नरेन्‍द्र मोदी ने गुटनिरपेक्ष देशों के शिखर सम्‍मेलन में हिस्सा लिया 2. सूक्ष्‍म, लघु और मझौले उद्यम मंत्री नितिन गडकरी ने कहा-मंत्रालय एग्रो-एमएसएम...

Follow the Page for Daily Updates!