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

World most famous article

1. Walmart to open new store in India after 2-year gap  i. After a gap of two years, US retail major Walmart will open a new cash and carry store in Agra as it returns focus on India.  ii. The company, which opened its last store in Bhopal towards the end of 2012, has said it will focus on cash and carry business in India in the absence of clarity on FDI in multi-brand retail trade. iii. "Walmart is committed to India and we are focused on our growth plans... We have recently received all internal approvals for opening a new store in Agra, our second one in the city," Walmart spokesperson told PTI. 2. Jyotsna Suri elected as the President of the FICCI i. Jyotsna Suri, Chairperson of Bharat Hotels, on 20 December 2014 was elected as the President of the Federation of Indian Chambers of Commerce & Industry (FICCI). ii. Suri succeeded Sidharth Birla. iii. Alok B Shriram, deputy managing director of DCM Shriram Industries Ltd, assumed the charge of the presid...

Follow the Page for Daily Updates!