Change drawable of scrollbarThumbVertical when scrolling is active - android

i tried to change the drawable of the scrollbar with a selector (state_pressed, state_focus, ...) but i didn't work.
scrollview
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/scroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbarSize="5dp"
android:scrollbarThumbVertical="#drawable/custom_scrollbar" >
selector
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="#drawable/scrollbar_pressed" />
<item
android:state_focused="true"
android:drawable="#drawable/scrollbar_pressed" />
<item android:drawable="#drawable/scrollbar" />
</selector>
one of the two drawables. the only difference is the color
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#color/grey"
android:endColor="#color/dark_grey"
android:angle="0" />
<stroke
android:width="1dp"
android:color="#color/white"/>
<corners android:radius="6dp" />
</shape>
any other solution for this?

Related

Shape not getting applied to Button Selector in Android

Shape Radius defined in xml is not getting applied to Button Focus & Pressed state.
I have
instagram_button_style.xml as below:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/instagram_button_shape" android:state_focused="true" android:textColor="#color/colorAccent" />
<item android:drawable="#drawable/instagram_button_shape" android:state_pressed="true" android:textColor="#color/colorAccent" />
<item android:drawable="#color/colorButton" />
</selector>
and My instagram_button_shape.xml as:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
<solid android:color="#color/colorButton" />
</shape>
</item>
<item android:drawable="#drawable/instagram_gradient" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
</shape>
</item>
</layer-list>
Where
instagram_gradient is a jpg image
Using it in button like :
android:background="#drawable/instagram_button_style"
My Initial Button State:
My Pressed Button State
Expectation: I was expecting pressed state to have oval button, but Radius is not getting applied.
FINAL Update:
At last, after numerous research I ended up changing my .JPG gradient file to android_gradient shape file.
You need to set android:radius="30dp" in your #drawable/instagram_gradient
Try this way
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="#+id/tvKioskMode"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:background="#drawable/instagram_button_style"
android:padding="10dp"
android:text="OPEN IN"
android:textColor="#android:color/white"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
drawable/instagram_button_style
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/instagram_button_shape" android:state_selected="true" android:textColor="#color/colorAccent" />
<item android:drawable="#drawable/instagram_button_shape" android:state_pressed="true" android:textColor="#color/colorAccent" />
<item android:drawable="#drawable/normal_button" />
</selector>
#drawable/instagram_button_shape
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
<solid android:color="#color/colorPrimary" />
</shape>
</item>
<item android:drawable="#drawable/instagram_gradient" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
</shape>
</item>
</layer-list>
#drawable/normal_button
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
<solid android:color="#color/colorAccent" />
</shape>
#drawable/instagram_gradient
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<gradient
android:angle="90"
android:centerColor="#00E5FF"
android:endColor="#FF1744"
android:startColor="#3D5AFE"
android:type="linear" />
<corners
android:radius="30dp"/>
</shape>
OUTPUT
UPDATE
#drawable/instagram_button_style
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/instagram_button_shape" android:state_selected="true" android:textColor="#color/colorAccent" />
<item android:drawable="#drawable/instagram_button_shape" android:state_pressed="true" android:textColor="#color/colorAccent" />
<item android:drawable="#drawable/normal_button" />
</selector>
#drawable/instagram_button_shape
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
<solid android:color="#color/colorPrimary" />
</shape>
</item>
<item android:drawable="#drawable/my_gradient"/>
</layer-list>
#drawable/my_gradient
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
</shape>
</item>
<!--add here your instagram image-->
<item
android:drawable="#drawable/insta_gradient_image"
android:bottom="30dp"
android:left="30dp"
android:right="30dp"
android:top="30dp"/>
</layer-list>
#drawable/normal_button
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="30dp" />
<solid android:color="#color/colorAccent" />
</shape>
try this to change instagram_button_shape.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="30dp" />
<solid android:color="#color/colorButton" />
</shape>
</item>
<item
android:bottom="30dp"
android:drawable="#drawable/instagram_gradient"
android:left="30dp"
android:right="30dp"
android:top="30dp">
<shape android:shape="rectangle">
<solid android:color="#color/colorButton" />
<corners android:radius="30dp" />
</shape>
</item>
</layer-list>
The <layer-list> has items, and you define this item incorrectly:
<item android:drawable="#drawable/instagram_gradient">
<shape android:shape="rectangle">
<corners android:radius="30dp" />
</shape>
</item>
Indeed, android:drawable defines the Drawable used to render the layer. The nested shape is just ignored.
You have three options to reach your goal:
use a shape with a gradient, and remove the android:drawable="#drawable/instagram_gradient"
use a PNG with transparency and rounded corners for the the #drawable/instagram_gradient
and of course implement a custom Drawable
The simplest way is wrap your button with CardView. It has property called CornerRadius. That way you can round your button into custom corner shape.
Try this Updated,
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/instagram_button_shape"
android:state_selected="true" />
<item android:drawable="#drawable/instagram_button_shape" />
<item android:drawable="#color/colorButton" />
</selector>
now, when you click this botton set
buttonId.setSelected(true);

Why doesn't my state-list-drawable applied to an ImageView use the drawable for pressed-state when I touch the ImageView?

I have my ImageView defined in XML like this:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/fragment_imageView"
android:src="#drawable/ic_photo"
android:background="#drawable/button_state_list_drawable" />
The button_state_list_drawable.xml is:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="#drawable/button_pressed_state_drawable"
android:state_pressed="true" />
<item android:drawable="#drawable/button_enabled_state_drawable"
android:state_enabled="true" />
</selector>
The button_pressed_state_drawable.xml is:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<size android:width="50dp"
android:height="50dp" />
<padding android:left="25dp"
android:right="25dp"
android:top="25dp"
android:bottom="25dp" />
<stroke android:color="#fff"
android:width="1dp" />
<solid android:color="#1aafd0" />
</shape>
The button_enabled_state_drawable.xml is:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<size android:width="50dp"
android:height="50dp" />
<padding android:left="25dp"
android:right="25dp"
android:top="25dp"
android:bottom="25dp" />
<stroke android:color="#fff"
android:width="1dp" />
<solid android:color="#android:color/transparent" />
</shape>
The problem is that when I click/touch the ImageView, the button_pressed_state_drawable does not seem to be used, i.e. I can't see the <solid android:color="#1aafd0" /> in action (which is basically the only difference between the two drawables), i.e the background color is still transparent instead of changing to blue. Where am I messing up?
I think your ImageView is not clickable.
Try to make it clickable by using ImageView.setClicked(true).
or
android:clickable="true"
Also make sure that your image resource is not covered your background.
This is what i've done which works fine.
<ImageView
android:id="#+id/fragment_imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/button_state_list_drawable"
android:clickable="true"
android:padding="20dp"
android:src="#drawable/ic_launcher"/>
<item android:drawable="#drawable/button_pressed_state_drawable"
android:state_pressed="true" />
<item android:drawable="#drawable/button_enabled_state_drawable"
android:state_enabled="true" />
A button can be both "pressed" and "enabled." Try removing android:state_enabled="true" from the 2nd item.

Highlight entire item in Cards UI ListView

I have a ListView where I've implemented a Cards UI-type look to it. If an item in the ListView is in the "selected" or "pressed" state, there is a white border around the item. I would like the entire view to have the blue color, but not sure how to achieve that:
ListView item layout
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RelativeLayout
android:id="#+id/itemLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:background="#drawable/bg_cards_ui"
>
<TextView
android:id="#+id/title"
android:layout_alignParentTop="true"
android:paddingBottom="4dip"
/>
<TextView
android:id="#+id/summary"
android:paddingBottom="4dip"
android:layout_below="#id/text"
/>
<TextView
android:id="#+id/siteName"
android:layout_below="#id/summary"
/>
<TextView
android:id="#+id/date"
android:layout_below="#id/summary"
/>
</RelativeLayout>
</FrameLayout>
bg_card_ui.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" android:dither="true">
<corners android:radius="2dp"/>
<solid android:color="#ccc" />
</shape>
</item>
<item android:bottom="2dp">
<shape android:shape="rectangle" android:dither="true">
<corners android:radius="2dp" />
<solid android:color="#android:color/white" />
<padding
android:bottom="8dp"
android:left="8dp"
android:right="8dp"
android:top="8dp"
/>
</shape>
</item>
<item>
<selector>
<item android:state_pressed="true" android:drawable="#color/my_blue_color" />
<item android:state_selected="true" android:state_pressed="false" android:drawable="#color/my_blue_color" />
<item android:state_activated="true" android:state_selected="false" android:state_pressed="false" android:drawable="#color/my_blue_color" />
<item android:state_selected="false" android:state_pressed="false" android:drawable="#android:color/transparent" />
</selector>
</item>
</layer-list>
Check this out:ListView - Highlight sub layout of item. I've implemented exactly what I think you're looking to do.
Basically, for what you've got, you need to have the selector reference a background xml file in the "drawable" property of the each item. You would need at least two background xml files, one for normal state and one for pressed which has the color changes you want. Should work after that.

Android Button border shadow

Shadow property in Button view gives shadow to text. How can I give shadow to right and bottom border of a Button?As shown below:
You can try it. I use it in my project. I give shadow to right and bottom border of a Button.
Button xml
<Button
android:id="#+id/buttonSignIn"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="#drawable/button_dropshadow"
android:textColor="000000"
android:text="Sign In" />
In drawable file add button_dropshadow.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item android:left="5dp" android:top="5dp">
<shape>
<corners android:radius="3dp" />
<solid android:color="#000000" />
</shape>
</item>
<item android:bottom="2dp" android:right="2dp">
<shape>
<gradient android:angle="270"
android:endColor="#ffffff" android:startColor="#ffffff" />
<stroke android:width="1dp" android:color="#000000" />
<corners android:radius="4dp" />
<padding android:bottom="10dp" android:left="10dp"
android:right="10dp" android:top="10dp" />
</shape>
</item>
</layer-list>
</item>
</selector>
Thank you.
Try making your own button 9-patch image with selector:
btn_normal.9.png:
btn_pressed.9.png:
btn_focused.9.png:
btn_selector.xml:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="#drawable/btn_focused" />
<item android:state_focused="true" android:drawable="#drawable/btn_focused" />
<item android:state_pressed="true" android:drawable="#drawable/btn_pressed" />
<item android:drawable="#drawable/btn_normal" />
</selector>
and add android:background="#drawable/btn_selector" in button's attributes.
Here is a blob post that I found and could help. It will only work in a RelativeLayout. Create a View component with the same size as your button and place it immediately below:
<Button
android:id="+#id\my_button"
android:layout_below="#id/some_layout_item"
android:layout_width="100dp"
android:layout_height="5dp"
>
</Button>
<View
android:layout_below="#id/my_button"
android:layout_width="100dp"
android:layout_height="5dp"
android:background="#drawable/drop_shadow"
>
</View>
Create the shadow as a drawable (drop_shadow.xml):
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android=”http://schemas.android.com/apk/res/android”>
<gradient
android:startColor="#color/cream_dark"
android:endColor="#color/cream"
android:angle="270"
>
</gradient>
</shape>
My button's background is set like this
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<gradient
android:startColor="#android:color/holo_green_dark"
android:endColor="#android:color/holo_green_light"
android:angle="90">
</gradient>
<stroke
android:width="1px"
android:color="#android:color/darker_gray" />
</shape>
The effect of the shadow can be done by adding a second shape under the original button shape, changing its color to a darker one either black or grey. But the shadow should be of the same shape as that of the button.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#android:color/darker_gray"/>
</shape>
To overlap different items we have to use a “layer-list” resource and include the previous shapes. The shadow should appear in first place and then the original button with some displacement. In this example, we are creating the shadow at the bottom of the button and an offset of 4px.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="#drawable/shadow"/>
<item
android:drawable="#drawable/button"
android:bottom="4px"
android:right="4px"
/>
</layer-list>
Now set the background of the button as the layerlist drawable. This should do it partially.

How to create EditText with rounded corners?

How to create an EditText that has rounded corners instead of the default rectangular-shaped corners?
There is an easier way than the one written by CommonsWare. Just create a drawable resource that specifies the way the EditText will be drawn:
<?xml version="1.0" encoding="utf-8"?>
<!-- res/drawable/rounded_edittext.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:padding="10dp">
<solid android:color="#FFFFFF" />
<corners
android:bottomRightRadius="15dp"
android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp" />
</shape>
Then, just reference this drawable in your layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dip"
android:background="#drawable/rounded_edittext" />
</LinearLayout>
You will get something like:
Edit
Based on Mark's comment, I want to add the way you can create different states for your EditText:
<?xml version="1.0" encoding="utf-8"?>
<!-- res/drawable/rounded_edittext_states.xml -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="true"
android:state_enabled="true"
android:drawable="#drawable/rounded_focused" />
<item
android:state_focused="true"
android:state_enabled="true"
android:drawable="#drawable/rounded_focused" />
<item
android:state_enabled="true"
android:drawable="#drawable/rounded_edittext" />
</selector>
These are the states:
<?xml version="1.0" encoding="utf-8"?>
<!-- res/drawable/rounded_edittext_focused.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#FFFFFF"/>
<stroke android:width="2dp" android:color="#FF0000" />
<corners
android:bottomRightRadius="15dp"
android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp" />
</shape>
And... now, the EditText should look like:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/hello"
android:background="#drawable/rounded_edittext_states"
android:padding="5dip" />
</LinearLayout>
Here is the same solution (with some extra bonus code) in just one XML file:
<?xml version="1.0" encoding="utf-8"?>
<!-- res/drawable/edittext_rounded_corners.xml -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:state_focused="true">
<shape>
<solid android:color="#FF8000"/>
<stroke
android:width="2.3dp"
android:color="#FF8000" />
<corners
android:radius="15dp" />
</shape>
</item>
<item android:state_pressed="true" android:state_focused="false">
<shape>
<solid android:color="#FF8000"/>
<stroke
android:width="2.3dp"
android:color="#FF8000" />
<corners
android:radius="15dp" />
</shape>
</item>
<item android:state_pressed="false" android:state_focused="true">
<shape>
<solid android:color="#FFFFFF"/>
<stroke
android:width="2.3dp"
android:color="#FF8000" />
<corners
android:radius="15dp" />
</shape>
</item>
<item android:state_pressed="false" android:state_focused="false">
<shape>
<gradient
android:startColor="#F2F2F2"
android:centerColor="#FFFFFF"
android:endColor="#FFFFFF"
android:angle="270"
/>
<stroke
android:width="0.7dp"
android:color="#BDBDBD" />
<corners
android:radius="15dp" />
</shape>
</item>
<item android:state_enabled="true">
<shape>
<padding
android:left="4dp"
android:top="4dp"
android:right="4dp"
android:bottom="4dp"
/>
</shape>
</item>
</selector>
You then just set the background attribute to edittext_rounded_corners.xml file:
<EditText android:id="#+id/editText_name"
android:background="#drawable/edittext_rounded_corners"/>
Try this one,
Create rounded_edittext.xml file in your Drawable
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="15dp">
<solid android:color="#FFFFFF" />
<corners
android:bottomRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
<stroke android:width="1dip" android:color="#f06060" />
</shape>
Apply background for your EditText in xml file
<EditText
android:id="#+id/edit_expiry_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dip"
android:background="#drawable/rounded_edittext"
android:hint="#string/shop_name"
android:inputType="text" />
You will get output like this
Thanks for Norfeldt's answer. I slightly changed its gradient for a better inner shadow effect.
<item android:state_pressed="false" android:state_focused="false">
<shape>
<gradient
android:centerY="0.2"
android:startColor="#D3D3D3"
android:centerColor="#65FFFFFF"
android:endColor="#00FFFFFF"
android:angle="270"
/>
<stroke
android:width="0.7dp"
android:color="#BDBDBD" />
<corners
android:radius="15dp" />
</shape>
</item>
Looks great in a light backgrounded layout..
By my way of thinking, it already has rounded corners.
In case you want them more rounded, you will need to:
Clone all of the nine-patch PNG images that make up an EditText background (found in your SDK)
Modify each to have more rounded corners
Clone the XML StateListDrawable resource that combines those EditText backgrounds into a single Drawable, and modify it to point to your more-rounded nine-patch PNG files
Use that new StateListDrawable as the background for your EditText widget
Just to add to the other answers, I found that the simplest solution to achieve the rounded corners was to set the following as a background to your Edittext.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#android:color/white"/>
<corners android:radius="8dp"/>
</shape>
With the Material Components Library you can use the MaterialShapeDrawable to draw custom shapes.
With a EditText you can do:
<EditText
android:id="#+id/edittext"
../>
Then create a MaterialShapeDrawable:
float radius = getResources().getDimension(R.dimen.default_corner_radius);
EditText editText = findViewById(R.id.edittext);
//Apply the rounded corners
ShapeAppearanceModel shapeAppearanceModel = new ShapeAppearanceModel()
.toBuilder()
.setAllCorners(CornerFamily.ROUNDED,radius)
.build();
MaterialShapeDrawable shapeDrawable =
new MaterialShapeDrawable(shapeAppearanceModel);
//Apply a background color
shapeDrawable.setFillColor(ContextCompat.getColorStateList(this,R.color.white));
//Apply a stroke
shapeDrawable.setStroke(2.0f, ContextCompat.getColor(this,R.color.colorAccent));
ViewCompat.setBackground(editText,shapeDrawable);
It requires the version 1.1.0 of the library.
If you want only corner should curve not whole end, then use below code.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="10dp" />
<padding
android:bottom="3dp"
android:left="0dp"
android:right="0dp"
android:top="3dp" />
<gradient
android:angle="90"
android:endColor="#color/White"
android:startColor="#color/White" />
<stroke
android:width="1dp"
android:color="#color/Gray" />
</shape>
It will only curve the four angle of EditText.

Categories

Resources