declare-styleable Questions
2
Solved
I'm implementing my own <declare-styleable> for a custom View (following the instructions here). I'd like to be able to specify an array of integers as one of the possible XML attributes. How...
Etty asked 8/1, 2013 at 16:33
4
Solved
I want both my ViewA and ViewB to have the "title" tag. But I can't put this in attrs.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="ViewA">
&...
Antichlor asked 16/9, 2013 at 12:19
7
Solved
I had created an app and when tried to run,get an error like this.
ERROR: In <declare-styleable> MenuView, unable to find attribute android:preserveIconSpacing
Problems
and at end of R.j...
Gregarine asked 25/3, 2015 at 6:8
1
I have an attr defined as an enum with a list of values:
<attr name="font" format="enum">
<enum name="AvenirMedium" value="1" />
<enum name="AvenirBlack" value="2" />
</attr...
Faience asked 6/6, 2017 at 21:36
6
Solved
I have a custom preferences control that I have defined a few attributes for in values/attrs.xml. Just to focus the conversation, here is an example of attributes that could be found in values/attr...
Prolongation asked 24/6, 2011 at 17:48
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
2
Here is the code I am using:
public ASSwitch(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray sharedTypedArray = context.getTheme().obtainStyledAttributes(
attrs,
R.sty...
Inferior asked 21/6, 2013 at 19:15
1
Solved
I have an activity . In that on a button click I want to change the theme but everywhere I found that theme can be set only once and that too before setContentView.
Restarting an activity is not a...
Brucebrucellosis asked 25/8, 2014 at 10:13
2
Solved
There's precious little documentation about the declare-styleable tag by which we can declare custom styles for components. I did find this list of valid values for the format attribute of the attr...
Exemplificative asked 16/5, 2011 at 16:28
1
Solved
This is my first time creating a custom view and I'm trying to populate it with entries via XML -- in a manner similar to a Spinner. I'm obviously doing something wrong here, but I've styled my app...
Automatize asked 19/9, 2013 at 1:59
1
Solved
Having this custom view MyView I define some custom attributes:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="MyView">
<attr name="normalColor"...
Kure asked 4/5, 2013 at 13:9
1
Solved
Suppose I am making some new views with styleable attributes. I declare them thusly (this is how the documentation says to do it:
<?xml version="1.0" encoding="utf-8"?>
<resources>
&...
Zohar asked 2/10, 2012 at 16:22
1
Solved
I have several custom Views in which I have created custom styleable attributes that are declared in xml layout and read in during the view's constructor. My question is, if I do not give explicit ...
Begin asked 2/6, 2012 at 5:58
1
I have a custom view (that extends viewgroup) and I have specified some custom attributes defined in attrs.xml....
<declare-styleable name="datascope">
<attr name="colcount" format="inte...
Aslant asked 1/3, 2012 at 18:26
1
Solved
I'm reading Beginning Android 4 Development and in chapter 5 it talks about Gallery and ImageVievs and introduces the declare-styleable XML tag without explaining its purpose.. I tried to find some...
Swell asked 31/5, 2012 at 20:8
2
Solved
I've begun playing around with styles and such in my android applications, and I have gotten everything working so far. I quite understood the 'style' section of the guide.
But, looking around, as...
Rainbow asked 3/1, 2011 at 15:38
1
© 2022 - 2024 — McMap. All rights reserved.