59,008 questions
3
votes
0
answers
55
views
Android "paddingHorizontal" Doesn't Work on TextInputEdieText
XML:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_inputLayout"
android:layout_width="match_parent"
android:layout_height="...
1
vote
1
answer
72
views
Does View.getHeight/getWidth include padding?
I was under the impression that the value returned by View.getWidth() includes padding in it. I don't think I'm hallucinating things - a common line of code that Android developers write is something ...
0
votes
0
answers
46
views
How to make the lottie animation overflow?
I have a lottie Animation which i need to overflow outside the view. I have set clipChildren , clipToPadding, clipToOutilne as false for the view and its parents. But the lottie animation is still ...
0
votes
1
answer
64
views
So the nestedscrollview is scrolling before even the CollapsingToolbarLayout starts moving or collapsing
So where i write Textview or imageview are real items so when i scroll the nested scroll will start scrolling specially all my 3 recycles are there i tried many ways did not really solve my problem so ...
1
vote
1
answer
62
views
ConstraintLayout v 2.2.1 not filling screen
Yet another SO question about ConstraintLayout and positioning. I have been having trouble with a particular layout, so I decided to go back to the basics and see what I'm not understanding.
Copied ...
Advice
0
votes
0
replies
18
views
Fill Parent pushes underlying elements outside of the screen
I'm new to Android and am making a simple app for personal use.
The layout I want to get is a button on the top, followed by a scroll view, followed by 2 other buttons that are always locked at the ...
1
vote
0
answers
78
views
Why the inflation time for a custom view is so long in Android using java xml?
problem
The time it takes to inflate is around 15ms ~ 8ms for a custom view, which is super long.
long startTime = System.nanoTime();
LayoutInflater.from(context).inflate(R.layout.view_profile,...
2
votes
1
answer
74
views
How does VectorDrawable scaling affect rendering performance?
I’m trying to understand how VectorDrawable rendering works in Android in terms of performance.
Suppose I have a vector resource defined like this:
<vector
xmlns:android="http://schemas....
0
votes
1
answer
49
views
WFF Condition Configuration Tag
I'm trying to configure a watch face I am working on. I can't seem to make the condition work. The Condition documentation is hard for me to understand - with lack of examples (online and in-...
0
votes
0
answers
53
views
Android BottomNavigationView overlaps list inside Fragment — how to add bottom spacing?
I’m having an issue with a Frame Layout inside a Fragment that also contains a Google Map and a BottomNavigationView.
Here’s my setup:
A BottomNavigationView is anchored to the bottom of the screen. ...
-1
votes
1
answer
53
views
Android Studio Multiline Text increase height or line when typing on new line
I want to increase Multiline Text height when user adding new line. Currently I use contraint layout and put 2 Multiline Text in it. The 2 Multiline Text is put on 2 rows with default 3 line size. I ...
0
votes
1
answer
87
views
Scrolling behaviour of AppBarLayout does not work with multiple inside layouts that show depending on bound data
I have a structure with a Toolbar, then an AppbarLayout containing a Tabbar and some additional area and below the AppbarLayout I use a Viewpager. The additional area should collapse when I scroll in ...
0
votes
1
answer
65
views
Buttons layout to be rearrange after hiding any one so fill the first row first
I have six button in two Linear Layouts, three in each linear layout. But If I hide any button from any Linear layout they are rearranged accordingly in the same linear layout. But I required the If I ...
0
votes
0
answers
64
views
Why does my Android EditText context menu display incorrectly?
My Android game (NativeActivity) opens a system dialog with an EditText field for text entry. The dialog opens fine and the text is editable, but when I select some text in order to cut/copy, the ...
0
votes
1
answer
25
views
Layout attributes styling via a theme not working for buttons
The following is in AndroidManifest.xml:
<application
android:theme="@style/FooAppThemeStyle"
...
>
In style.xml:
<style name="FooAppThemeStyle&...
0
votes
0
answers
11
views
How do I override onPreferenceChange for a single item in a MultiSelectListPreference?
I'm modifying some code (which I didn't write) which uses a MultiSelectListPreference defined with xml (I would have done it with code) like this:-
<MultiSelectListPreference
...
0
votes
0
answers
20
views
Create shadow shape XML Android
I want to create an drawable resource file to set background for view like the image bellow. It has the blur and corner (radius 12dp) at background, the detail information is also at the picture ...
0
votes
1
answer
47
views
Data in Widget disappears after placing it android
Data in my widget is disappearing when I place it on the screen. Only the layout is showing.
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:...
2
votes
0
answers
110
views
ImageView adjustViewBounds=true attribute is not rendered correctly in layout preview
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:...
1
vote
1
answer
22
views
Cannot dynamically adjust z-index of ConstraintLayout children when using a camera stream & map
In my layout i display a stream widget (the WidgetFPV one) which contains a surface onto which a camera stream is projected via DJI'S MSDK5 sdk. I also have a card mapCard which hosts a MapBox map ...
1
vote
0
answers
75
views
Fading line appearing after Text In TextView
I have a recyclerView which displays cards with TextViews.
Whenever a new textView appears, a line appears after the text, which quickly disappears. I am not sure what it is and looking for a solution ...
1
vote
1
answer
65
views
How to adapt a 320x800dp design for a 411x731dp Android device screen?
I have a Figma design with a frame size of 320dp width × 800dp height that I want to implement in my Android app using XML layouts. However, my target device screen size is 411dp width × 731dp height.
...
1
vote
0
answers
109
views
How can I disable the ripple effect on click to MaterialCardView?
There is a MaterialCardView with a checkable state, when clicked to set the isChecked, a ripple effect appears. When clicked to unset the isChecked, it does not appear. How can I disable the ripple in ...
0
votes
1
answer
468
views
How to convert Figma px to Android dp to match design size and make layout responsive?
I have a toolbar designed in Figma with a height of 157px.
I tried to set the height in Android XML as android:layout_height="157dp" but it looks much smaller on my Android phone compared to ...
0
votes
1
answer
55
views
FloatingActionButton srcCompat icon shifts off-center after resizing
When I change the android:layout_width and android:layout_height attributes of my FloatingActionButton in the XML layout, the srcCompat icon becomes decentered.
This is a very basic setup with a ...
0
votes
2
answers
69
views
UI Widget Flutter - page layout appears messy
After the app is built into an APK, sometimes the page layout appears messy like this. It doesn’t happen often, but it’s quite annoying because I have to refresh the page. This usually happens when I ...
0
votes
0
answers
53
views
Android Studio include layout constraint not work
I'm using include layout in my layout resource, but when put it inside, the include layout cannot expend(the include layout view display normally, but the constraint of include layout seems not work, ...
0
votes
0
answers
21
views
Vertically scrollable TextView inside of HorizontalScrollView & CoordinatorLayout
I have the following old XML landscape layout:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
0
votes
0
answers
38
views
How can I add a scrollable multiline edit text in a nested scroll view in xml?
I am trying to create a posting fragment. It basically has a LinearLayout containing a TextInputLayout for text input, posting buttons, etc., and a RecyclerView to display posts. At the top of the ...
0
votes
0
answers
49
views
How to create custom button class in android that wouldn not change visual?
Before that, I used the standard android buttons, but I needed to make a custom button and I wrote such a class.
public class MyButton extends androidx.appcompat.widget.AppCompatButton {
private ...
0
votes
1
answer
55
views
Android Studio: How does content_main.xml inherit from fragment_first.xml?
I created a template app which contains fragment_first.xml and content_main.xml.
When I look at fragment_first.xml in the designer, the component tree contains a button, a textview and a listview. I ...
0
votes
0
answers
30
views
Drawer menu in android studio not "solid"
So for a school project we need to create an app with eco-house, and I got a problem its when I open the first time the drawer everything fine because header is "solid" and nothing goes ...
0
votes
0
answers
28
views
How to get the right Height for toolBar in a fragment?
this is my xml code in main activity for fragment
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent&...
0
votes
0
answers
44
views
How to scroll a TextInputEditText inside a ScrollView/NestedScrollView
I'm trying to make a TextInputEditText with maxLines = 10 be scollable in a way that when it's done scrolling, the parent should scroll but I can't get it to work.
The TextInputEditText behaves as if ...
0
votes
0
answers
27
views
FAB is going out of screen
This is Home fragment of my app of notes app. I’m making this layout right according to the preview but when I run it on actual device it goes out. I tried many things including fit window screen but ...
1
vote
2
answers
85
views
Android Button text is cut off in BottomSheetDialogFragment
My Button text is cut off althought layout preview shows it correct way. When I run it on my real phone it is cut off with ... instead of going to new line. I am attaching screenshots:
what I want:
...
0
votes
0
answers
36
views
Android Studio: How to create staggered/overlapped images
Using Android Studio, I want to create an android phone app that presents a field of staggered circles, similar to those in this picture. The important thing is the positions of the circles relative ...
0
votes
3
answers
81
views
Android RecyclerView to show video slider
I want to show videoes in recycler view, the problem is when I swap from the first video and back to the first, the first video reloads again, I want to make all videoes loaded at once and when I swap ...
1
vote
0
answers
52
views
Dynamic Fluid effect Background using Android java
I have been researching on how to recreate the background effect of Apple music and how it extracts colors and makes this dynamic slow moving fluid like with colors of extracted album art and animate ...
3
votes
1
answer
197
views
Button with RepeatListener in Android does not change color when being pressed
I have a button in xml layout file
<Button
android:id="@+id/button_heat"
android:layout_width="0dp"
android:layout_height="0dp"
...
0
votes
0
answers
72
views
Display a dimming effect (scrim) when a standard bottom sheet is displayed
Android provides two ways to implement a bottom sheet:
Modal bottom sheet (uses BottomSheetDialogFragment)
Standard bottom sheet (uses a CoordinatorLayout and a view with com.google.android.material....
0
votes
1
answer
102
views
How to build a Custom Android keybaord with Kotlin and Jetpack Compose like Gboard or SwiftKey?
I've been searching for a good tutorial on creating a custom keyboard using Kotlin and Jetpack Compose, but I haven't found any comprehensive resources. The Android documentation recommends using an ...
1
vote
0
answers
112
views
Jetpack Compose Full-Screen Dialog Extends Beyond Screen Bottom on Some Devices
I'm trying to understand what is causing this behaviour in a full-screen dialog. When I test on a pixel6 emulator, it's all good. Also in an Android10. On the pixel7, not so much. Both images are ...
0
votes
1
answer
70
views
Flutter - How to Reset Layout Page Drawer, After Change the page and get back
I'm newbie with flutter
anyone can help me How to Reset Layout Page Drawer, After we Change the page and get back ?
this my code (update):
import 'package:flutter/foundation.dart';
import 'package:...
0
votes
0
answers
36
views
Keeping multiple RecyclerViews in alignment
I'm making an app meant to be navigated with a tv remote (Up, down, left, right, etc...).
I have several horizontal recycler views stacked on top of each other which can be properly navigated with ...
0
votes
0
answers
44
views
How to change shadow color (glowing shadow) in ImagButton in Android studio?
I want to implement a glowing shadow like in the pic.
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:...
0
votes
1
answer
49
views
GridLayout Horizontally Flipped On Some Devices
While looking at the screenshots of my app on the Google Play Console Pre-launch Report, I noticed something very strange for 2 devices (Google Pixel 8 & Generic Small Desktop (x86)). Here are ...
0
votes
0
answers
77
views
Inconsistent BottomSheetBehavior: BottomSheet jumps and RecyclerView fails to resize on some devices
I'm experiencing inconsistent behavior with Android's BottomSheetBehavior on some devices. My app layout contains a CoordinatorLayout with an AppBarLayout, a main RecyclerView, and an included ...
1
vote
1
answer
40
views
AAPT: error: attribute pageColor (aka com.package:pageColor) not found in JakeWhorton/viewpagerindicator
This issue persists in the JakeWharton/ViewPagerIndicator, specifically in the CirclePageIndicator.
<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/blogindicator"
android:...
0
votes
1
answer
44
views
Android recyclerview gain focus itself before its items gain focus
I want to expand my recyclerview on click on it but at the same time with this first click I do not want any recyclerview item to gain focus. Recyclerview item should gain focus on second click.
I ...