Questions tagged [android-xml-attribute]
15 questions
7
votes
3 answers
Use Strings with placeholder in XML layout android
I have a string with placeholder e.g
Hello %s
I want to use this in xml layout as android:text="@string/str_1". Is there any way to use this in xml layout to fill the placeholder?
Thanks in advance. I already know…

SimpleCoder
- 1,665
- 1
- 21
- 34
5
votes
1 answer
Can I use scalable pixels for layout dimensions?
Is anyone aware of any problems with using sp units for layout dimensions? So, say I have a 16sp text, is there any problem with setting TextView height to 20sp for example, so it scales with the text?

zarsky
- 680
- 2
- 14
- 24
4
votes
2 answers
Android Studio "Unknown attribute android:text" warning in new project
There's a warning that annoys me in Android Studio 3.5.3 for Linux, which I'm trying for the first time.
I'm following the Android Tutorial Create an interactive Dice Roller app and, on the 3rd step, it says that the button's text could be altered…

Oloturia
- 43
- 7
1
vote
0 answers
Android MaterialToolbar what is app:menu used for?
I'm developing an android app in Java and want to add a custom regular MaterialToolbar with a settings icon on the right side.
I had a look at the MDC-Android how to implement it.
In the Android Studio design preview everything looked just fine, but…

Steffen
- 501
- 1
- 14
0
votes
0 answers
Inputs fields take time to be accessible
I am implementing an android app with input fields in kotlin . Sometimes it takes some time to get access to them to make some inputs . The keyword takes some time to display and when it does't , i cannot exit it when pressing the back button . I…

Patrick Renaud
- 75
- 7
0
votes
1 answer
Keep fast-scroll bar in recyclerview from fading
Is there a possibility to keep the scroll-bar of a fast-scrolling recyclerview from fading?
Right now I have this recyclerview:

Sarah Multitasker
- 471
- 4
- 14
0
votes
1 answer
launch_background.xml color to hex color
I want to make my splash screen using flutter framework
all I want to do is to change the splash screen color form white to 003A55 in Hex enter image description here

SH EB
- 61
- 8
0
votes
1 answer
Why doesn't the "@string/" attribute not have a + sign?
I know that the + sign in the id attribute of a View indicates that it's a new user defined custom value that must be added to the R.Java file. But, in the example XML Button View attributes below, why does the @string not have the + symbol before…

Raj Narayanan
- 2,443
- 4
- 24
- 43
0
votes
1 answer
How to compare string.xml files's unicode character in android studio?
In my android project's string.xml file contains an unicode character.
%
and MainActivity.java have this code :
StringBuilder myString = new…

H.Das
- 225
- 2
- 9
0
votes
1 answer
Android - When and for which purpose we use the following prefixes in android xml file?
I am new to android development and confused about the following prefixes:
xmlns:android
xmlns:app
xmlns:tools
android:something
app:something
tool:something
I am confused about them because sometimes I use one, and android studio marks it as red…

Stack Overflow
- 1
- 5
- 23
- 51
0
votes
2 answers
How do I get a tag inside android xml string resource
I want to get the tag inside the xml array like country , countryCode , iso2 , iso3.
-
Afghanistan
…

David Kariuki
- 1,522
- 1
- 15
- 30
0
votes
0 answers
How to give corner radius to the background image where the top rounded image is attached to the background image?
How to give corner radius to the background cover picture, where the upper rounded picture is attached with this. Can anyone help me to get this design? Like this image ...Expecting this, But right now I am just capable to get this Getting…

Sk Suraj
- 1
- 2
0
votes
2 answers
-1
votes
1 answer
Cannot find an icon at Android studio latest version
enter image description here
I cannot find the button that switches the xml attribute editor and xml attribute table. This is the latest version of android studio and I am completely new to this interface. Help me out to find it.

Safiyatul Hoque
- 13
- 2
-2
votes
1 answer
How to allow alphabets only in EditText Kotlin?
I need to allow alphabets only using EditText (like name) but it's allowing numeric values also
I give FieldType.TEXT_PERSON_NAME -> etField.inputType = InputType.TYPE_TEXT_VARIATION_PERSON_NAME or InputType.TYPE_TEXT_FLAG_CAP_WORDS (like…

Krishna Dhas
- 11
- 3