Category "android-layout"

How can i add a Toolbar in Jetpack Compose?

I need to add a Toolbar in my Android application with a List like below. I am using Jetpack Compose to create the UI. Below is the composable function i am usi

White background shows during 1 sec when keyboard closes on Android

When I tap to close the virtual keyboard, white background is shown on that place for 1 second. I use Activity(WindowSoftInputMode = SoftInput.AdjustResize) to

Data binding: Missing required view with ID

I create an app using binding and I get an error that I couldn't solve. The error is java.lang.RuntimeException: Unable to start activity ComponentInfo{com.exam

Data binding: Missing required view with ID

I create an app using binding and I get an error that I couldn't solve. The error is java.lang.RuntimeException: Unable to start activity ComponentInfo{com.exam

keep the margin when the referenced view is gone in ConstraintLayout

I have 2 TextViews as in the xml below. If I hide the textView2 at runtime, I lose the bottom margin. How can I keep the bottom margin between textView and pare

How to add smooth movement, relative positioning and animations to chat heads like views

I am using "Draw over other aps" to show a chat head like view. I need to position it relatively and show animation while dismissing it. Please see first video/

Software keyboard overlaps content of jetpack compose view

Suppose I have some activity with a jetpack-compose content class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) {

How to control views wrapping in Android's GridLayout?

I'm wondering why in portrait mode, this android xml is not rendered properly: <?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android="http:

How to control views wrapping in Android's GridLayout?

I'm wondering why in portrait mode, this android xml is not rendered properly: <?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android="http:

Android: How to set status bar and navigation bar semi transparent

In some applications I noticed that the status bar and navigational bar are transparent however, not completely. I do not know if this is a background color or

Android Tab layout: Wrap tab indicator width with respect to tab title

Is there any way to wrap tab indicator width with respect to tab title ?

Custom Image Slider Android studio?

Style Slider Corner radius Layout is getting scattered on corner radius so i have no idea about it if any one help ! xml File <com.smarteist

One Android project two java file & res file

I took this from another resource but I have two java files and a res file I could not understand very well. Are these two files necessary?

java.lang.IllegalStateException: view!!.findViewById(R.id.dog_image) must not be null

I am working with Android Studio and Kotlin. I am trying to create an RecyclerView and a Adapter. I obtain the following error when I try to use the RecyclerVie

what should be the size of Drawer Header Image?

public DrawerProfile(Context context) { super(context); HeaderImageView = new ImageView(context); HeaderImageView.setVisibility(VISIBLE

Popup menu goes out of the screen

Popup menu on inflate goes out of the screen for this activity, works fine for other Extending custom AppCompatActivity Styles: <style name="AppTheme.Ac

rich link preview in android

I am working on an application where I think rich link preview (whatsapp supports it,refer image) will be helpful for users but I am not able to get an idea to

Android status bar is the same color as Toolbar

I am running an android project. My toolbar and status bar are all green in my activity_main layout. If i change toolbar color to other color the status bar wil

How to remove Header title in bottom nav bar - Android Studio

My objective is removing the orange bar thar has the label "App name". Currently I have a top_app_bar and bottom_nav_bar. As far as I know the orange bar is gen

Android databinding set padding if value is true

I want to be able to to be able to set padding values if a boolean is true. The problem is that Android studio cannot parse the layout because it thinks 2dp is