layer-list Questions
4
Hi I am trying to create a background drawable for my splash screen which I'll be setting in theme itself. But the bitmap drawable used to keep in the center is getting stretched and I am not able ...
Leucomaine asked 21/3, 2016 at 6:23
2
Solved
I tried several options but I can't find the best way to do this: I want to change the margin of a Linear Layout when button is clicked using XML. Here's my code for the selected button:
<?xml ...
Sisson asked 29/8, 2013 at 7:11
16
Solved
I need to create an android shape so that only the bottom has stroke (a dashed line). When I try the following, the stroke bisects the shape right through the center. Does anyone know how to get it...
Kedron asked 8/10, 2013 at 3:47
4
I'm trying to create a Button with two backgrounds, my custom background
android:background="@drawable/background_profile_edit_button" + ?attr/selectableItemBackground```
Full button:
<TextV...
Candace asked 15/3, 2020 at 8:34
4
I am attempting to use a VectorDrawable in a LayerList without scaling the vector. For example:
<layer-list>
<item android:drawable="@color/grid_item_activated"/>
<item android:gr...
Audible asked 16/1, 2016 at 19:25
3
I try to create a simple illustration using XML layer-list drawable.
I have two shapes, a circle and a rectangle
I want a circle not to scale.
The following is the layout:
<LinearLayout
xmlns:a...
Vidette asked 31/3, 2014 at 17:16
3
Solved
I want my LayerList to have an opacity of 80 so I wrote:
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="80">
But I get:
Error: Integer types not...
Teddi asked 28/1, 2013 at 8:58
4
Solved
I need to create a drawable with a layer-list such that the background layer is an image and the foreground is a transparent color. I am able to do that. Where I am not succeeding is adding some pa...
Pirozzo asked 8/2, 2014 at 23:6
2
Solved
I am creating a LayerDrawable that creates bottom stroke but i dont know how to give bottom margin of a layer(Drawablw).
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"&...
Multivocal asked 22/7, 2015 at 9:7
3
Solved
Background
I'm trying to make a (fake) shadow below a view, so that the layers would be vertical in this manner:
a line of color "#43000000" with a height of "1dp"
below the line, a gradient tha...
Consolata asked 14/11, 2014 at 13:40
2
Solved
I've been trying to recreate a background image in xml (as drawable). Since the background is a simple shape, it would be better if it is created as xml drawable.
The is a really large gradient ci...
Behm asked 9/4, 2018 at 1:9
1
My question is related to this one: link. I've recently changed most of my resources for Android from different png files for different resolutions to vector drawables. I'm using a "swipe-to-delete...
Vicious asked 6/11, 2015 at 22:41
1
Im trying to achieve something like this, I used layer list in the xml this way :
<item>
<shape android:shape="rectangle" >
<gradient
android:centerColor="#4DD0E1"
android:e...
Kortneykoruna asked 18/12, 2017 at 8:18
5
This is my XML code which works fine, the only problem is it's showing border on all four sides while I want only to show border on the top and on the bottom only. How can I do that?
<?xml vers...
Divestiture asked 10/9, 2013 at 12:38
1
Solved
What is the purpose of android shape xml tag useLevel attribute ? This is in respect to a layer-list but should not matter.
From the docs i found the meanging of the useLevel tag:
Indicates wh...
Favourite asked 4/3, 2016 at 18:58
0
Is there a way add a layer to a LayerDrawable on API < 23? Do I have to create a new LayerDrawable using the constructor just adding the new layer?
Osteoporosis asked 4/4, 2017 at 16:22
2
Solved
I have a layer-list
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:right="2dp" android:left="2dp" and...
Strum asked 27/7, 2016 at 10:51
0
I'm trying to create a background drawable made of a gradient that fills the entire view and a pattern with left gravity that resizes to fit vertically while keeping its aspect ratio.
This is what...
Fay asked 6/1, 2017 at 16:57
3
Solved
I'm creating a list with a RecyclerView.
Every list item is a post from a user (Right now hard coded).
The background for every post is loaded from a layer-list XML file in the drawable folder.
Ev...
Smollett asked 29/12, 2016 at 1:22
0
This is my first code that loads a Vector-Drawable in layer-list. it works fine.Later I had to change color of my vector drawable. I find that I should add bitmap to use tint attribute.
This is my ...
Inclinable asked 25/12, 2016 at 10:36
1
I am trying to implement splash screen without any extra activities, using theme call in the manifest file's <activity/> tag.
In my styles.xml
<style name="splashTheme" parent="AppTheme...
Episcopate asked 2/7, 2016 at 16:0
2
Solved
I'm trying to center a drawable image with some padding on either side to use as a splash screen logo. The problem is it's either stretched across the entire screen or ignores any padding if I use ...
Hitoshi asked 27/10, 2016 at 0:30
1
Solved
Yesterday, I've switched to Android Studio version 2.1.3. Today, I've re-opened one of my projects and tried to add some layer-list drawables for use with an ImageView. For example this one:
<l...
Pantomime asked 9/9, 2016 at 11:28
0
I've made a custom vertical progress bar and I want to show labels along side it.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/andr...
Diocletian asked 25/1, 2016 at 7:3
3
This is a xml for triangle shape:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@+id/shape_id">
<rotate
android:fromDegrees="45"
and...
Ramie asked 24/2, 2014 at 23:39
1 Next >
© 2022 - 2024 — McMap. All rights reserved.