3,996 questions
Advice
0
votes
0
replies
56
views
How to port the interfaces from Android's view. java to the jet-compose system
I already know that you can use AndroidView in compose to achieve this goal, but what I'm thinking is how to wrap the interface so that the calling object of the interface is composable. Like this:
...
0
votes
1
answer
104
views
How can we draw something between the background and the contents of an arbitrary View instance that we don't own?
I'm working on a library that modifies the appearance of Views at runtime,
"live". I need to insert some draw operations z-wise-between a View's
background and its contents – i.e., right ...
1
vote
1
answer
100
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
58
views
NavGraph & viewmodel gets reset on each config change
I’m using a single activity app, where you have a Splash screen using the new splash screen api, keepsplashscreen is used to keep showing the splash screen till the check if the user is logged in or ...
0
votes
0
answers
99
views
View in WindowManager Flickers on Animated Height Change with `WRAP_CONTENT`
I am trying to create a system overlay using WindowManager. This overlay contains a ComposeView which, in turn, hosts a Composable that animates its height.
My WindowManager.LayoutParams for the view'...
1
vote
1
answer
100
views
How to change TextView color depending on the color behind it?
I have a TextView drawn on a LinearProgressIndicator.
Part of the LinearProgressIndicator is blue and part of it is light blue.
I want the TextView color to be lighter on the blue part and darker on ...
0
votes
0
answers
160
views
androidx.media3.ui.PlayerView Full Screen Button Disabled on Android 15
I am using a androidx.media3.ui.PlayerView on an Activity to play a video on full screen in landscape.
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:...
0
votes
0
answers
58
views
Deactivate slider from user click
I want to deactivate my slider so the user won't be able to touch it. I found the isClickable, but it works only for buttons. What is the equivalent of a slider?
My XML:
<Button
android:id=&...
0
votes
1
answer
40
views
Why does RecyclerView.canScrollVertically occasionally throw "Attempt to invoke virtual method ...View.getLayoutParams()' on a null object reference"?
Layout:
<RelativeLayout
android:id="@+id/relativeLayoutMain"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="...
2
votes
1
answer
51
views
Showing Full Screen View in Activity in Xiomi Note 12s Android device
I have run an Android app on different devices. It shows the full-screen view on Xiaomi devices, which leads to an overlap of the activity's top and bottom areas, while it works fine on other devices ...
0
votes
0
answers
65
views
Draw a composable into canvas before it is ever drawn to screen
I'm creating an AnimatedVisibility-like API that operates on a Bitmap of the content for enter-exit transitions. I'm using the recommended way to draw a composable's content into a bitmap.
Basically ...
1
vote
2
answers
330
views
AppBar loads with delay when using AndroidView with WebView in Jetpack Compose
I'm building a Jetpack Compose screen that has an AppBar at the top and a WebView below it using AndroidView.
The problem is that the AppBar takes a noticeable moment to appear when the screen loads.
...
0
votes
0
answers
40
views
LazyVerticalGrid inside ViewPager2 inside LazyVerticalGrid - Jetpack Compose
I want to design a profile screen similar to Instagram, where you have a header, a tab, the content for each tab, and the whole screen is vertically scrollable.
Video of what I'm trying to achieve, ...
0
votes
0
answers
73
views
Is View.onDetachedFromWindow always after View.onAttachedToWindow
For a long time, I've always thought that View.onAttachedToWindow(alias it ATTACH) and View.onDetachedFromWindow(alias DETACH) come in pairs, eg: ATTACH - DETACH - ATTACH - DETACH。 But today I found ...
1
vote
1
answer
287
views
How we can consistently detect YouTube Shorts screen in an Android Accessibility Service?
I'm developing an Android Accessibility Service that detects when a user is scrolling through YouTube Shorts and takes action accordingly. However, the detection is inconsistent because the view ID ...