Skip to main content

Questions tagged [android-layout]

A layout defines the visual structure for a user interface, such as the UI for an activity, fragment or app widget.

Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

Flutter singlechildscrollview layout error

I coded simple screen like below. However singlechildscollview column hide upper +/- button. Why this symptoms occured? and how can I fix it? my development condition as follows android : 2024.1.1 ...
YeonSoo Jung's user avatar
0 votes
0 answers
8 views

Adding ImageView Dynamically Behind Transparent Areas in Multiple Frames in Android App kotlin

I am developing an app where each frame contains a transparent area where users can place their images. The size and position of this transparent area vary across more than 100 frames, some having 3 ...
Bashir Ali's user avatar
0 votes
1 answer
25 views

How to make a floating NavigationView in Android

I want to replicate the menu that Google has in its applications, but I don't know if there is a component like NavigationView and DrawerLayout that allows this menu to be made but that is not fixed ...
caflorezv's user avatar
0 votes
1 answer
30 views

What is the alternative way for android development without android studio?

I want to be an Android developer. As Android Studio is hungry for memory, I don't have enough memory for Android Studio on my computer. But I want to continue android development without Android ...
Ferdous Hasan's user avatar
0 votes
0 answers
12 views

Can not extract resource from com.android.aaptcompiler.ParsedResource@3d1b2c66 error in android studio

Can not extract resource from com.android.aaptcompiler.ParsedResource@3d1b2c66 this error is shown in android studio i was tring to run texttospeech app on android and at that time of running the app &...
Sudhanshu Kumar's user avatar
0 votes
0 answers
8 views

How to correctly inflate and convert this layout to bitmap, with correct dimensions

I'm having issues converting layout to Bitmap keeping the correct dimensions. This is what I have in my layout file: And this is what I get as the result: It creates the wrong dimensions, and seems ...
somerandomusername's user avatar
1 vote
0 answers
22 views

Empty space when creating an AlertDialog, only on Oppo phones

I was just trying to migrate my application from a Realme to an Oppo and everything looked fine until I noticed the displayed dialogs were not centered. Here is the example (I will only talk about the ...
DeadFrancis's user avatar
0 votes
0 answers
19 views

uneven raws in recyclerview using gridlayout manager Android kotlin

The problem is I am trying to design a layout with two columns and no rows or uneven rows this is my current design my current design and this is what I want to achieve expected design. This is my ...
Likkle Shadi's user avatar
0 votes
0 answers
31 views

How does LazyColumn/LazyRow extract each composables from items block

I am implementing my own custom layout. So there is a centre Node. As of getting branch nodes(in parameter of composable) i thought of using item block as we regularly use in lazylist composables. ...
androidDeweleper's user avatar
0 votes
0 answers
21 views

How to change the order or RecyclerView items in GridLayoutManager?

I have written my own implementation of GridLayoutManager to display specific given number of rows and columns of RecyclerView. The problem is, that the items are being rendered in a top-to-bottom ...
jasiu's user avatar
  • 53
1 vote
1 answer
56 views

BottomNavigationView height issue - Icons not centered properly

I'm having an issue with my BottomNavigationView where the icons are not vertically centered. In the Android Studio preview, everything looks perfect, but when I run the app on an emulator, the height ...
Ali S.'s user avatar
  • 11
2 votes
1 answer
33 views

How do I make the XML Layout as in the image which I want?

Consider my semi-circle.xml file: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape=&...
Kabir's user avatar
  • 109
0 votes
0 answers
24 views

Android SurfaceView surfaceCreated Callback Not Triggered in Custom React Native Module

I'm working on a custom React Native module for my EXPO EAS Build Android app that involves streaming a raw H264 Drone footage live. The module includes a custom view (StreamingView) that manages a ...
darukun's user avatar
  • 11
-3 votes
1 answer
58 views

Menu is not showing when I run my app in android studio [closed]

I created the menu directory inside res to create main_menu.xml after creating the xml file for the menu I added 2 items. These items are just 2 icons with a title & id. I used @override method of ...
Shaurya Yadav's user avatar
0 votes
2 answers
50 views

Gap under the Bottom Navigation Bar

I have a pink gap between the bottom navigation bar and the action bar: This is the bottom navigation bar xml: <com.google.android.material.bottomnavigation.BottomNavigationView android:id=...
Dulitha Bandaranayake's user avatar
0 votes
1 answer
50 views

Why aren't we using ConstraintLayout in Jetpack compose as much as we did in XML?

I've been reviewing codes and I realized we don't use ConstraintLayout as often as we did in XML. In XML we were encouraged to use ConstraintLayout due to the performance concerns instead of those ...
Nadi Parsa's user avatar
0 votes
0 answers
9 views

Deleting White Background on xml shape

I have a problem where in the following xml code there are several white areas left because I created a radius of 50 dp. And I want the white area to disappear, how do I do that? <?xml version=&...
Muhammad Fajar Baihaqi's user avatar
0 votes
0 answers
26 views

How to create sub directory in res>layout folder in android studio?

I am using kotlin and kotlin DSL I want to create sub directory under layout directory. So that I can manage my layouts more effieciently. There are many layout files, so it is such a mess to manage ...
Jihan Khan's user avatar
0 votes
0 answers
12 views

I want to place logo at left top side, but It appears below than location of design page. (XML, Kotlin)

I'm student. and I'm making school app for my coding club. I want to place my school logo at left top side. In design view, there is no problem. But when I open app in android, The location of logo ...
user25527221's user avatar
0 votes
1 answer
31 views

Unable to change bottom nav icon tint

im trying to implement icon tint to the bottom nav , but it seems not to work for some reason, i have added hard coded #color code and also added it into colors.xml and also made a selector for that ...
Indie Dev's user avatar
0 votes
1 answer
44 views

View wrap_content in not working in TableLayout

I add table rows with cells to a table dynamically. The rows and cells are added, but the text in the cells do not wrap. Part of code follows here: Layout is as follows: <TableLayout ...
mvdn's user avatar
  • 23
0 votes
1 answer
56 views

How to correctly add background or big images to Android Studio for Views?

For example I have .jpg 4k image that I want to set as background, or other resolution .jpg/.png that I want to add somewhere on the screen (for example character that goes out from View). How should ...
GOLDProFA's user avatar
  • 599
0 votes
0 answers
18 views

Android xml: How to make floating action button at the top of bottom sheet instead of overlapping the bottom sheet?

I would like to make the icon sitting the top of the bottom sheet instead of overlapping to the bottom sheet. Here is my xml code: <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android=...
Kelsey Zhou's user avatar
0 votes
0 answers
8 views

MaterialTextInputLayout, when i have end_icon mode clear_text clears drawables

I have a MaterialTextInputLayout which has an end_icon_mode="clear_text", when i use startIconDrawable for MaterialTextInputLayout, it has a big padding between edittext and icon, so i ...
endlesjoy's user avatar
0 votes
0 answers
34 views

Not able to inspect layout for API 34. Showing pop up It is taking unusually long time to connect continue waiting in Android Studio Giraffe

In Sdk manager-> sdk tools installed layout inspector image server for API 31-35. layout Inspector working for Api 32 taking long time to connect but not getting inspect. Want to find out ...
user18800033's user avatar
0 votes
1 answer
30 views

Android: How to remove blank space from HorizontalScrollView

How to remove blank space that I get on the right? When I have 5 or more photos, then blank space disappears. With 2 photos I get blank space. Tried on Galaxy Nexus emulator and also on my Samsung S23 ...
horvoje's user avatar
  • 789
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
1 vote
0 answers
27 views

Snackbar shown at top of screen appears cut off

I am using CookieBar2 to display a cookie bar at the top of the screen: CookieBar.build(this@AppAdActivity) .setTitle("TITLE") .setMessage("MESSAGE") .setDuration(10000)...
Arda's user avatar
  • 11
1 vote
0 answers
38 views

Catch a javascript event in a webview and make it notification

So I have a web server I'm hosting on a microcontroller (ESP32) linked to a motion captor. The server hosts a webppage that generates a JS event every time the motion captor is triggered. I have a ...
Med Yassine Aghnaj's user avatar
0 votes
1 answer
71 views

How to create a custom view with a linear gradient border in Android?

I am trying to create a custom view in Android that has a linear gradient border with rounded corners, similar to the one shown in these image: I've written the following custom view class in Kotlin,...
Saif Khan's user avatar
  • 122
0 votes
1 answer
24 views

How can I adjust an image view to make sure an image fills the bounds but does not crop

Lets say I have an image view and I want to display a 600 x 900 image. I want to make sure the image fills the image view, but it not cropping "center crop" or using "scaleXY". ...
adrian joshua's user avatar
0 votes
0 answers
14 views

Using three different DrawerLayouts

I am trying to use 3 diferent side menus and for that 3 layouts one for each and a menu for each layout, but only the layout in the activity_main is working when i run the app.the other two when i ...
alfredo aguiar's user avatar
0 votes
1 answer
31 views

BottomNavigationView only shows 1 icon at a time and only when the space containing the (invisible) icon is clicked

Kotlin Android app has a BottomNavigationView on the initial fragment. When the app is run the first icon of 5 in the view shows but the remaining icons/labels only show when that (blank) part of the ...
stroopwafel's user avatar
0 votes
0 answers
21 views

How the google sheet ui is made?

Today i have used it (i normally avoid apps which requires siginging in ) . I have noticed, its fast compared to the others of similiar kind yet It have the "all directional " scrolling and ...
user152626's user avatar
0 votes
0 answers
22 views

There is some space inside the Bottom Navigation View below the items in XML and Kotlin in Android Studio

I created a bottom bar using BottomNavigationView and used a menu file to display items inside it. When I set the height of the BottomNavigationView to wrap_content, it displayed with some space ...
NETHRAN Kumaraswamy's user avatar
0 votes
0 answers
28 views

How to reenable Accessibility settings on Android after reboot?

i am developing a tv launcher i have setup accessibility so that each time the tvlauncher is called my applications is called instead .This works fine But if i unplug then replus the tv the android ...
dev's user avatar
  • 3
0 votes
0 answers
27 views

Views are not aligned properly in custom gridview layout

cstm_grd_layout.xml it is the custom grid view that will be used to show photo and name of each photo it contains ian imageview and an textview <androidx.constraintlayout.widget.ConstraintLayout ...
Aditya Deshwal's user avatar
0 votes
0 answers
140 views

Buttons Misaligned After Loading Scaled and Dragged Positions from SharedPreferences

I’m working on an Android application where users can drag and scale buttons on the screen. The position and scale of these buttons are saved to SharedPreferences so that they can be restored when the ...
Star1x's user avatar
  • 1
0 votes
0 answers
23 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
20 views

LayoutParams weight works unexpectedly

I'm trying to create LinearLayout with 2 children LinearLayouts. I can't use XML and should make this programmatically. For parent I apply: LayoutParams(MATCH_PARENT, WRAP_CONTENT, 1f) 1st child: ...
Alexander's user avatar
  • 151
0 votes
1 answer
32 views

how to make layout to be in front? androidstudio

<LinearLayout android:id="@+id/toplayout" android:layout_width="0dp" android:layout_height="wrap_content" android:orientation="...
luka lutidze's user avatar
0 votes
0 answers
25 views

How to position TextInputLayout's endIconMode="clear_text" to the left side of the TextInputEditText?

I am using android:gravity="end" on TextInputEditText and the placement of the end icon in this case is far from ideal, as shown in the following image. Note that the both the hint and value ...
Viktor Brešan's user avatar
0 votes
1 answer
47 views

How to force the app to open in custom "minimum width"

so i have my phone that is set to "minimum width of" 384dp (in developers options), what i want to do is to open my android studio app like if the phone had its minimum width of 478dp. is ...
luka lutidze's user avatar
0 votes
1 answer
39 views

Adding ListViewItem from text changed event in Kotlin

If the user types in ListViewItem text: "Add new item" I want to add a new item. This is my code so far: class DataModel internal constructor( var checked: Boolean, var itemDesc: ...
Pawel's user avatar
  • 127
0 votes
1 answer
27 views

Why does my cardview go over the whole width in Android Studio?

Im using this cardview (blue) and another one in an recyclerview to display messages sent and received. But the cardview (blue) goes over the whole width as you can see int the picture and I cant stop ...
Terry's user avatar
  • 33
0 votes
0 answers
57 views

Any Chart View in Jetpack Compose

I'm currently working on project that uses AnyChart available at https://github.com/AnyChart/AnyChart-Android and I structured my app using jetpack compose. AnyChart uses a xml view: <com.anychart....
Afonso Silva's user avatar
0 votes
1 answer
42 views

is there a way to remove default style from button in android?

I have button in android studio xml file and its not changing shape and color when I change it i dont wanna make my own styles how it looks here is my code: <?xml version="1.0" encoding=&...
Paeqw's user avatar
  • 11
0 votes
2 answers
61 views

Why is my layout blowing up on physical devices?

I am learning android studio following a Udemy course. The course itself is all fine and I'm getting on well with it. The only issue is, my laptop is weak, like 8gbs of ram weak. So running emulators ...
Ayrton Greenfield's user avatar
0 votes
0 answers
25 views

How to create a layout similar to Walkthrough screen in Android?

I am implementing a feature in my android app. This feature has multiple parts. One of the part requires user to complete a 5 step process in order for successful completion. Currently I have ...
SSF's user avatar
  • 11
0 votes
0 answers
25 views

how to increase touch box of a button and make background stay the same?

I have encountered into a problem where my image was too big on a button so I had to decrease my buttons size that also decreased the touch box or so called hitbox. what I want is the background to ...
luka lutidze's user avatar

1
2 3 4 5
1183