android-layout Questions

5

Problem: layout XML folder is missing? How to add it?
Billhook asked 9/1, 2018 at 12:54

3

Solved

I have the following custom view: <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-...
Gladwin asked 8/1, 2020 at 13:55

2

Solved

How can I reduce the spacing between actionbar homeasup button and action bar title? It used to have a smaller spacing but somehow the spacing has increased. I didn't make any changes in the xml o...
Batson asked 4/12, 2016 at 17:47

2

Solved

I need to write a method to determine if the device is a tablet or a phone. I don't need to display a different user interface depending on this. I only need information about the device, so that i...
Okajima asked 6/3, 2022 at 21:59

4

Solved

How to put close button at top corner in alert dialog box for android? put close button at right side top corner in alert dialog. i have used below code for scroll and dialog box <ScrollView ...
Inlier asked 18/6, 2013 at 12:1

3

Solved

I found the webview is similar to scroll view , that means when I scroll the view to the end, there will be a blue shade at the end of the view (if it is >4.0) . So, how to disable the behavior of ...
Pietje asked 29/1, 2014 at 2:54

4

Solved

I want to create a square grid inside ConstraintLayout. My first thought was to create a horizontal chain, give some margin value and set to all single view size attributes width = match_constraint...
Dewees asked 19/7, 2018 at 19:4

5

Solved

I'm relatively new to Android development and I'm having a hard time putting together a certain interface. I've looked through many similar questions but none of them give me the answer i'm looking...
Deltoro asked 18/9, 2013 at 10:49

2

I am trying to map a List<List<Object>> to a RecyclerView in Android, but the result is totally messed up. For example, I have a list of list like this (just for explaining, not my real...
Bedmate asked 15/4, 2015 at 23:14

4

Solved

I have a Box in my app with a bunch of children: Box(modifier = Modifier.fillMaxSize()) { Text("a") Text("b") } I want the text to appear aligned to the top at 20% distance f...
Foret asked 23/4, 2022 at 9:35

7

Solved

Getting this exception when I created a new project with a new Activity. Exception raised during rendering: Could not find layout resource matching value 0x7F04001B (resolved name: content_main)...
Sipes asked 7/6, 2016 at 22:0

5

Say that, I'm building a custom compose layout and populating that list as below val list = remember { dataList.toMutableStateList()} MyCustomLayout{ list.forEach { item -> key(item){ listI...
Psychasthenia asked 5/4, 2021 at 9:40

2

Solved

How can I align an Image with a Text's baseline in a Row. Modifier.alignByBaseline() works for the Texts but the Image doesn't participate in the alignment. @Composable fun Sample() { Row( modifi...
Panslavism asked 25/8, 2021 at 5:20

8

Solved

I'm becoming crazy figuring out what is the best way to handle screen rotation. I read hundreds of questions/answers here but I'm really confused. How can I save myClass data before the activity i...
Uke asked 12/4, 2012 at 15:31

1

In Android Studio Iguana | 2023.2.1 Canary 6 , When I use this version of Android studio, It cannot preview any layout while I use older version such as *Android Studio Giraffe | 2022.3.1 Patch 2 *...
Lull asked 30/9, 2023 at 8:38

11

Solved

I have TextInputLayout and TextInputEditText like this <com.google.android.material.textfield.TextInputLayout android:id="@+id/loginUsernameText" android:layout_width="match_parent" android:...

25

Solved

I'm new to android programming. How do I change the color of a button? <Button android:id="@+id/btn" android:layout_width="55dp" android:layout_height="50dp" android:layout_gravity="center"...
Bandore asked 19/9, 2015 at 17:10

7

I need to add border with rounded corner in Button using Jetpack Compose Like :

4

Solved

I'm dipping my toes into Jetpack Compose, but I'm stumped by the behaviour of Row. I have a text next to an icon button, and I want the icon button to be anchored to the side with a minimum width o...
Martian asked 29/8, 2021 at 10:37

4

Solved

I am trying to set a semi-transparent view over another view when user click on a certain button. And at the same time I want my background view not to be clickable. So basically I am setting alp...
Janitor asked 16/3, 2015 at 8:26

6

Solved

I know the difference between them. I want to calculate the text height base on lineHeight. The value of lineHeight is in TextUnit so I want to convert it into Dp.

11

Solved

Suppose I have some activity with a jetpack-compose content class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) se...
Cataldo asked 24/9, 2020 at 16:15

9

<ImageView style="@style/LoaderPrevNext.Next" /> using the styles <style name="LoaderPrevNext"> <item name="android:layout_width">40dp</item> <item name="android:lay...
Printable asked 20/2, 2012 at 14:59

5

Solved

I have a CoordinatorLayout with a Toolbar and a TabLayout inside the AppBarLayout. Additionally, I have a ViewPager inside the CoordinatorLayout but outside the ViewPager. The problem is that the...

2

Solved

I have a screen where some textfields I want to show a 'fake' keyboard. The keyboard should be able have as many buttons as I like and be displayed however I want. Just as shown below. My question...

© 2022 - 2024 — McMap. All rights reserved.