58,955 questions
Advice
0
votes
6
replies
114
views
In Android with Kotlin, is there any way to create a custom element with XML that can contain a child in a specific place?
I’ve been trying to create a custom CardView with a title and below the title any type of content, but, when I try overriding addView in the Kotlin class of the custom element to redirect the child, ...
Score of 3
0 answers
83 views
Android Studio How can I position a view in the center of a frame using code
I am trying to resolve an issue that is stopping my development.
I want to position an imageview so it is in the center of a frame layout using code.
I have been trying various solutions but do not ...
Score of 1
1 answer
108 views
How to Separate Buttons in MaterialButtonToggleGroup
The best I can do:
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/file_type_toggleGroup"
android:layout_width="wrap_content"
android:...
Score of 0
0 answers
94 views
FullScreen API Not Working in Android Studio Virtual Phone
I've recently been working on porting an HTML5 video game I built for Android devices as an app. I am using Android Studio to assist with development.
After some trial and error, I've been able to get ...
Score of 0
0 answers
92 views
How to show a custom brand image (privacy overlay) in the Recent Apps switcher instead of a screenshot?
Context:
I am trying to implement a "privacy curtain" feature similar to many banking apps. The goal is to hide the app's content with a branded splash image when the app enters the ...
Score of 0
0 answers
74 views
Problem with "moving" checkBox in xml layout
I have the following layout as a row in a recyclerview.
My problem is that the checkbox doesn't remain anchored to the right (end) of the screen.
Instead it attaches itself to the end of "title&...
Score of 3
0 answers
103 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="...
Score of 1
1 answer
116 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 ...
Score of -1
1 answer
78 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 ...
Score of 1
1 answer
87 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
32
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 ...
Score of 1
0 answers
93 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,...
Score of 2
1 answer
104 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....
Score of 0
1 answer
73 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-...
Score of 0
0 answers
73 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. ...