Questions tagged [android-xml]
Android projects use XML in several ways: defining the project and components, building layouts, defining animations, creating menus and specifying resources (static and dynamic) for the project.
android-xml
3,028
questions
0
votes
1
answer
22
views
Cannot display an image in Constraint Layout
I have this xml but the image is only shown when I hard the width and height of the image. I am not sure why the constraints as I provided in the code are not working.
<merge
xmlns:android=&...
1
vote
1
answer
191
views
How NOT to create projects with Jetpack Compose using Android Studio
I can't create a normal project without jetpack-compose, it always includes its libraries and configurations in Android Studio, and the working project requires not using it.
I expected it to open ...
0
votes
0
answers
22
views
SVG Image doesn't show up when I use app:srcCompat but works fine when I use android:src
I downloaded and Added an SVG file to my Project's Drawable Directory. When I used it in my Layout with app:srcCompat, the Image doesn't get displayed. I even added the VectorDrawables....
0
votes
2
answers
27
views
Fatal Exception: android.content.res.Resources$NotFoundException: Drawable org.radarcns.detail:drawable/status_searching with resource ID #0x7f080130
I am getting the exception:
Fatal Exception: android.content.res.Resources$NotFoundException: Drawable org.radarcns.detail:drawable/status_searching with resource ID #0x7f080130
Caused by android....
0
votes
1
answer
38
views
MaterialAutoCompleteTextView automatically shows dropdown when changing theme
I'm using MaterialAutoCompleteTextView to display a dropdown list for selecting a theme.
xml:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/...
0
votes
0
answers
25
views
Difference between app and android in .xml file?
Today when i was working on one of my project when i had issue of white screen when we navigate from one screen to another screen. So i changed theme and added this line
<item name="android:...
0
votes
1
answer
23
views
TextInput displaying too narrow on phones with a small screen size
In the following xml, 'message_entry' displays too narrow on a small screen (240 x 320), but displays fine on a larger screen (480 x 640).
<androidx.cardview.widget.CardView
android:id="@+...
0
votes
0
answers
29
views
How do I implement the UI as in the image below using constraint layout with XML in android studio?
how do I implement the below UI using constraint layout with xml in android studio?
0
votes
0
answers
19
views
TextView fadeEdge to fade text on the left side
I have a text view to display the digits entered by the user. I want to add fading to the left of the text when the digit entered is long and cannot fit in the textView. I.e I want the least recently ...
1
vote
1
answer
33
views
Prevent Snackbar Overlap with FloatingActionButton in ConstraintLayout of Activity's Child Fragment
This is my current Setup:
I have a BaseActivity that registers the snackbar on the root layout (CoordinatorLayout):
<?xml version="1.0" encoding="utf-8"?>
<androidx....
1
vote
0
answers
40
views
Customise switch appearance in AndroidX preference activity
Summary: How do I customise/style the colour and appearance of AndroidX switch preferences?
Detail: Simplifying a bit, I have an Android app that uses the AndroidX preference classes. My preference ...
2
votes
0
answers
73
views
Per-app language preferences - get list of app's available language programmatically?
So based on https://developer.android.com/guide/topics/resources/app-languages#kotlin
we can use
android {
androidResources {
generateLocaleConfig = true
}
}
which automatically generates ...
0
votes
0
answers
24
views
Tab Bar does not change its font
Material TabBar does not change its font with any style or theme settings.
I tried looking for attributes to help me change the font in the tab, but I couldn't find any. Then I came up with the idea ...
0
votes
0
answers
181
views
How to create a iOS scrollable time picker in Android?
I need to implement a scrolling timepicker that should be as similar to this one as possible (it's an element from ios, to be frank).
Unfortunately, I haven't found such elements in material3.
I ...
0
votes
0
answers
57
views
How to round the corners of the items from recycler View
I am trying to set the corners of the items using CardView but when i swipe the item its background has the sharp corners. I am attaching image as well as code please check and tell me where i am ...