Skip to main content

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
0 votes
1 answer
20 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=&...
MXC's user avatar
  • 488
1 vote
1 answer
142 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 ...
Cristian Tech's user avatar
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....
Amey079's user avatar
  • 131
0 votes
2 answers
26 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....
Aditya Mishra's user avatar
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/...
djes's user avatar
  • 36
0 votes
0 answers
24 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:...
Darshan bhatt's user avatar
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="@+...
user7391836's user avatar
0 votes
0 answers
28 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?
Kossy's user avatar
  • 19
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 ...
jackJerryoop's user avatar
1 vote
1 answer
31 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....
Chris's user avatar
  • 13
1 vote
0 answers
38 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 ...
Andy Johnson's user avatar
  • 8,108
2 votes
0 answers
71 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 ...
user924's user avatar
  • 11.1k
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 ...
arlosane's user avatar
0 votes
0 answers
169 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 ...
arlosane's user avatar
0 votes
0 answers
56 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 ...
Ash Kecthum's user avatar

15 30 50 per page
1
2 3 4 5
202