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.
58,663
questions
0
votes
0
answers
10
views
Transparent status bar and constraint to its bottom
I want to get transparent status bar. I managed to get it with this code:
WindowCompat.setDecorFitsSystemWindows(window,false)
WindowInsetsControllerCompat(window,window.decorView)....
0
votes
0
answers
7
views
arrange images in recyclerview with gridlayoutmanager in android
I want to arrange an image in recyclerview in form of grid but it will be auto arrange with by taking recycler width and height
I want grid layout like this when there is only 2 image in that 1 image ...
0
votes
1
answer
32
views
Handle multiple recycler views in Android [Kotlin]
I have a situation where I have 3 recycler views on a single screen. They are dependent on each other in a certain way. Data is coming from Room Database.
Question Prototype (Problem statement): Let's ...
-1
votes
0
answers
8
views
NullPointerException PID: 17621 Attempt to invoke interface method on a null object reference [duplicate]
I'm trying to Search Movie and want to load its information into recycler view. Even Everthing sets okay but the results showing that i'm trying to invoke list.size on a null object reference. Here is ...
0
votes
0
answers
23
views
Android - There is a space at bottom
I am building an Android application in which I would like to show the bottom navigation view inside the Drawer layout. And I am seeing the unnecessary space at the bottom.
Here is XML file.
...
0
votes
0
answers
16
views
HitRect returning wrong Y value for unknown reason
I am creating a pixel art app, which has the following layout:
Input events are detected inside the pixel art board, meaning that if the user swipes from the root layout and travels their finger ...
-1
votes
1
answer
12
views
Vertical Bars show chemical level android like attached image
I want to draw same vertical bars for show different levels of different chemicals shown as below image
Can anyone help me for draw same UI. Thanks in advance.
0
votes
1
answer
23
views
Cheatsheets for Views in Android Studio
Hi I am working for a week with android studio.
Is there any cheatsheet for the properties of views (buttons, editText, TextViews etc.)?
Something similar like these:
https://websitesetup.org/css3-...
0
votes
0
answers
20
views
Push Front View up with Keyboard, don't push Background View up in Kotlin Compose
I want to do something like this:
Where there is a view that pops on top of the open keyboard.
I've tried to do this, and I have this so far:
However, when I put this view in a Box, as the second ...
0
votes
0
answers
22
views
not getting executed AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED with (performGlobalAction(AccessibilityService.GLOBAL_ACTION_HOME)) [closed]
I have designed an application which automatically returns to android home page when ever a particular application is opened and prompts an error
if (value.startsWith("1"))
{
...
0
votes
1
answer
14
views
Optimise Kotlin code for button clicked state
I want to change the button background when the button clicked, the function is work by using this code
bank1.setOnClickListener {
bank1.setBackgroundResource(R.drawable....
0
votes
0
answers
26
views
androidx.constraintlayout.widget.ConstraintLayout is over lapping
Layout image
I am new to android development. I made this androidx.constraintlayout.widget.ConstraintLayout layout and it is over lapping the screen. I have also nested other cardview and constraint ...
0
votes
0
answers
25
views
selector drawable not working when applying on a button
selector drawable xml not working when applying it to a button on the screen, whenever i change the background of the button to the drawable xml the button is not being pressed when i run the app and ...
0
votes
0
answers
10
views
app functions not getting executed (performGlobalAction(AccessibilityService.GLOBAL_ACTION_HOME))
I have designed an application which automatically returns to android home page when ever a particular application is opened and prompts an error
if (value.startsWith("1"))
{
...
0
votes
0
answers
11
views
Dynamically change View Size in android studio
I am not new to coding in android studio, however, I have a bad time changing my dynamically added button's size from the code itself but I ran into some issues
here is the way I am trying to change ...
0
votes
1
answer
34
views
Show custom alphabets - a,b,c,d,e only (Android Keyboard)
Is it possible to show only 5 alphabets - "a","b","c","d","e" only rather then showing all the alphabets on android keyboard. I tried it by adding ...
0
votes
1
answer
45
views
+100
android chat bubble with reply UI
I'm trying to create a chat bubble with the following code,
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/...
0
votes
0
answers
19
views
How to force layout of a view hierarchy in Android+RN+Google Ad SDK
We have an infuriating situation with what are called "fluid ads" on Android in a React Native app. Basically the React Native layout infrastructure and the Google Ads Android infrastructure ...
-3
votes
0
answers
28
views
Making a clock for the always-on display [closed]
How can I make an app for the always-on display with Android Studio?
This screen is displayed when the mobile is locked.
Like the picture below
enter image description here
enter image description ...
1
vote
2
answers
46
views
Problem in some views in items row of recyclerview "not showing like disign preview"
I trying to practice some android lessons that contains recyclerview topic, currently I succeed to implement all api and response but there's one problem with my item_article_preview.xml
the title and ...
0
votes
0
answers
23
views
FlatList RefreshControl interrupts presses after refresh on Android after upgrading to Expo 45
After I refresh the page once, I am unable to press anything in the top half of the screen when using the FlatList or SectionList from React-native. When using the inspect feature on expo I find that ...
0
votes
0
answers
40
views
seterror issue in edittext
hi I'm facing two problems in while setting error in edittext
first issue is : error box going outside of the edt box
second issue is:
as it is a password edt box so after error im not able to see ...
0
votes
0
answers
20
views
Is there a view layout which overflows child views to a new line? [duplicate]
I'm looking for a layout in android where I can programatically throw it a bunch of buttons, and it would take them all and display them in a row until no more buttons fit, then it'll put them on a ...
0
votes
1
answer
12
views
Adding Chips into ChipGroup dynamically: border is not visible?
This is how I make a static ChipGroup
<com.google.android.material.chip.ChipGroup
android:id="@+id/chip_group_filter"
android:layout_width="match_parent"
...
1
vote
1
answer
30
views
HorizontalScrollView with AutoSize textView in Android
I want to create a layout where textview will automatically resize the text inside it but after getting to minimum size it should start scrolling like in google calculator. Something like this.
By ...
1
vote
1
answer
22
views
How does Jetpack Glance widget works without XML? How does it convert to RemoteViews?
Jetpack released a tool called "Glance" that we can replace RemoteViews XML widgets.
I wonder how it converts compose layouts to RemoteViews.
Thanks.
2
votes
2
answers
63
views
Android spinner dropdown item ripple background goes outside the round corners
I have an AppCompatSpinner with a dropdown menu custom background with rounded corners. When I tap an option in the AppCompatSpinner, it shows the ripple background however the ripple goes outside ...
0
votes
0
answers
23
views
How can race condition cause the view to be INVISIBLE [closed]
I have a text view placed which is being animated when we update text it. So basically, how it work is
TextView VISIBLE-> We receive response from server-> Recyclerview updates the UI, calls the ...
0
votes
0
answers
13
views
Insets Diagram for Android 11
I am working on learning how to use all the different insets features of Android 11:
https://developer.android.com/reference/android/view/WindowInsets.Type
One of the things that always confuses me ...
1
vote
0
answers
16
views
Are .setContentTitle and .setCustomContentView mutually exclusive?
Trying to create android notifications with a custom body provided by an XML file.
When I try to set the title of these notifications, it does not appear.
Oddly, the subtext continues to show just ...
0
votes
0
answers
38
views
Jetpack compose TextField IP address visual transformation and validation
What is the simplest way to create a TextField in Jetpack Compose with IP address validation and Visual transformation?
I need a TextField that advances automatically to the next group of numbers in ...
0
votes
1
answer
37
views
Floating action button not displaying properly
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
0
votes
2
answers
62
views
Android TextView next to ImageView set text programmatically causing a null when referencing
Hey all I am trying to figure out how to put text into a TextView that's beside a ImageView so that I can label each image as this section of code does:
protected void onCreate(Bundle ...
0
votes
1
answer
27
views
LinearLayout with adjustResize
Prelude
For practice, I'm attempting to copy Apple's iMessage.
I'm using nested LinearLayouts for the message bubbles and the input bar, however the problem is when the keyboard pops up. I have it set ...
1
vote
1
answer
35
views
My app crashes when i try to move to a particular layout
My log cat :
2022-07-29 21:42:03.128 24303-24303/com.example.newcadviewerapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.newcadviewerapp, PID: 24303
java.lang.RuntimeException: Unable ...
-1
votes
0
answers
19
views
Custom Notification Layout Issue Android Version 12
I have created custom notification but app name and small notification icon is also coming in it how to remove this issue android version 12. while android version 11 coming on right.
0
votes
1
answer
42
views
Recyclerview Layout cant match parent
Im trying to make 2 recyclerview. And 2 of it using the same layout with Match Parent width. But the first Recyclerview display it properly but the second one doesnt.
My first Recyclerview XML :
<?...
0
votes
1
answer
23
views
Android Keyboard hides TextView Element NativeScript
When I try to write something in an TextView-Element which is at the bottom of the screen, the Android keyboard hides the element. How can I resolve this issue? I already tried adding 'adjustPan' and ...
0
votes
1
answer
32
views
Adding Spaces between Tabs in Tab layout in android?
I am working on Android. I created a Tab layout with a view pager, and set the borders of a tab. I want to create spaces between tabs. I created separate files in drawable for the tab background and ...
0
votes
0
answers
26
views
Viewing Blank Screen While Download app from Play store after upload Bundle in Play Console
[I Uploaded APK as an bundle in google play console. While download Uploaded app from play console and open application it displays complete white screen. I can't able to find the root cause for this ...
0
votes
1
answer
65
views
How to remove the default background color for pressed PopupMenu items?
I've added rounded corners to a PopupMenu and it looks good, except now when I press a menu item, I get the ugly effect shown here:
In this example, while my finger is touching the third item, ...
0
votes
0
answers
21
views
Attempt to invoke virtual method void androidx.recyclerview.widget.RecyclerView.setLayoutManager
I have a problem if u want see and help me ;)
I'm a student and I don't understand why my recyclerView has a null result.
If you have a solution it will be appreciated.
The Glide annotation in the ...
0
votes
2
answers
43
views
Android Studio xml layout files not recognized as layout file
I've been encountering some very odd problems with Android Studio today.
When I open an XML layout file, it opens as a plain text for some reason. It even says that I have a typo for constraintLayout ...
2
votes
2
answers
66
views
How to disabled ripple effect in TabRow or Tab in Jetpack Compose?
I would like to use the TabRow, but when I click the background has a ripple effect that I do not want. Is there a way to change this? I have the Tab's selectedContectColor equal to the same ...
1
vote
0
answers
35
views
How to slow down AnimateScrollToItem in Jetpack Compose?
I have a lazy list that I am animating scroll to Item when clicking on a button.
onClick = {
scope.launch {
lazyListState.animateScrollToItem(selectedIndex)
}
}
Why is it that the ...
-2
votes
0
answers
37
views
How to create a complex custom layout in Android
Hi I am trying to create a view like in the image. Those numbers 5, 10 will be dynamic and I need to create this view around it. Numbers position won't change only their values change. How can I ...
0
votes
0
answers
11
views
Problems with reusing IDs of nested elements in <include> layout in multiple fragments?
Being new to android development and working on approach of navigating user to multiple fragments within an activity, I came across a doubt regarding including a layout file within multiple(not all) ...
0
votes
1
answer
28
views
How to update TabRow Indicator with LazyListState in jetpack compose?
I can't show the app due to company policies, but pretty much I have a Lazy List that will animateToItem when a tab is selected, but also when the User scrolls on the Lazy List, the tab indicator ...
0
votes
0
answers
19
views
Detect all user gesture with in the android app
Is there is any way via which all user gestures, touch can be detected in app?
Using LifecycleCallbackHandler, I am able to get all the activity instances in onActivityResumed(Activity activity). Is ...
0
votes
0
answers
9
views
Fingerprint Icon as a Progressbar. Android Project
I want to set the fingerprint icon color as per the strength like if the fingerprint strength is 40% then only 40% of the icon should be colored(Like a progressbar). How can I achieve it?