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...

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...

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...

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...

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...

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...

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?...

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...

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 ...

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...
1

© 2022 - 2024 — McMap. All rights reserved.