android-attributes Questions
2
I have an app with several skins. In one skin i define android:colorBackground and then I want to set this color in an XML layout as ViewGroup background color. How do I do it? Is it possible? Or i...
Hyaena asked 1/5, 2019 at 16:35
6
Solved
I need to implement my own attributes like in com.android.R.attr
Found nothing in official documentation so I need information about how to define these attrs and how to use them from my code.
Bauhaus asked 9/8, 2010 at 15:8
5
Solved
I have created a simple custom view that contains a RelativeLayout and an EditText:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_pare...
Bifocal asked 16/6, 2017 at 8:20
5
Solved
I have an application with min sdk 16 up to 23. I want to use Material design as much as possible. It also has to be fullscreen app. AppCompat support library is included. Now I have Logon activity...
Desirous asked 17/12, 2015 at 9:43
5
Solved
I want to have 2 selectable themes for my application. In order to do that, I defined some attributes, like this:
<attr format="color" name="item_background" />
Then, I created both theme...
Hypochromia asked 7/11, 2011 at 19:34
1
Solved
I have android application with custom themes which was developed 2-3 year ago.
I had this stylable in my attr.xml resouce file:
<declare-styleable name="EVETextViewPlus">
<attr name="c...
Upheave asked 19/7, 2019 at 15:11
3
Solved
How to define a Button with custom background and the attribute
"?attr/selectableItemBackground" ?
With this code the "?attr/selectableItemBackground" attribute is ignored, it doesn't show the to...
Poplar asked 13/3, 2017 at 11:10
4
Solved
When inflating my layout, I get this exception:
E AndroidRuntime: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class <unknown>
E Android...
Gerri asked 29/10, 2015 at 8:32
3
I want to apply some style to DatePicker. In platform's attrs.xml we can see following attributes for DatePicker styleable:
<declare-styleable name="DatePicker">
...
<!-- The text color...
Chandra asked 20/5, 2017 at 17:19
2
I noticed that the Samsung apps have a specific shape; for example, the Gallery, Camera, Phone, Messages and Internet app icons below.
Is there a way to specify an icon for Samsung devices only?...
Ethe asked 16/2, 2017 at 16:8
1
I can't find any information about the differences between:
android:textColor="?attr/colorPrimary"
vs
android:textColor="?colorPrimary"
I have read that "?attr" means attribute value specifie...
Almanac asked 6/6, 2017 at 13:45
3
I am trying to write some code in Android to set parameters in an AttributeSet from attrs.xml file. But I am getting a "Resource not Found" error.
Java Code
MainActivity.java
package com.example...
Argentiferous asked 11/5, 2014 at 11:46
1
I have a View that I created programmatically, and I want to have a ripple effect when I select it. I was able to get that working using ?attr/selectableItemBackground. However, I also want to set ...
Morganstein asked 22/12, 2016 at 19:37
3
Solved
I'm trying to include different layouts in my View depending on the parent Theme.
Following the idea:
attrs.xml
<attr name="themeLayout" format="reference" />
styles.xml
<style name...
Gnat asked 15/5, 2015 at 12:21
1
I'm facing a problem and i tried several ways to face it, still unsuccessful.
My app is using multiple themes like : Halloween, Chirstmas, etc and i'm using some colors attributes on widget like ...
Stocking asked 18/1, 2016 at 16:42
3
Solved
I need to set transparent background for my button, but only background, not all button.
I've tried:
android:background=""
android:background="null"
and background changed on transparent, but i'...
Souvenir asked 26/9, 2015 at 19:57
1
Solved
I have a custom view A that has a TextView. I Made a method that returns the resourceID for the TextView. If no text is defined the method will return -1 by default.
I also have a custom view B tha...
Mantilla asked 15/1, 2015 at 8:35
1
© 2022 - 2024 — McMap. All rights reserved.