How to disable default scroll behavior of an EditText?

All we need is a simple explanation of the problem, which is provided below. The title of question might look similar to other questions but It’s not. I have several strange problem that I am not being able to solve it. I have a xml layout and the structure of that layout looks like below. … Read more

How to increase the height of a BottomSheetDialog to follow a vertical translation

All we need is a simple explanation of the problem, which is provided below. I’m trying to move views vertically in a BottoSheetDialog, but I’m getting an unexpected behavior. My BottomSheet looks like this Before Translation I’m moving my constraint Layout with myLayout.animate().translationY(-100f).setStartDelay(0).start() That’s the BottomSheet after the translation: After Transition How can I increase … Read more

The fab button is not visible in layout in android

All we need is a simple explanation of the problem, which is provided below. The fab button is not visible in layout. Without using listView the fab button is visible but when i add listView, the fab button is not visible. <?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/my_drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" tools:ignore="HardcodedText"> <LinearLayout android:layout_width="match_parent" … Read more

How to add a TabItem by activity?

All we need is a simple explanation of the problem, which is provided below. I need the TabLayout to have an "x" number of tabs, which can vary according to the user’s data that is already in the database My xml: enter code here<com.google.android.material.tabs.TabLayout android:id="@+id/select_bar" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:tabContentStart="32dp" app:tabMode="scrollable"> <com.google.android.material.tabs.TabItem android:id="@+id/posto1" android:layout_width="wrap_content" … Read more

Button background color is not showing in my android activity

All we need is a simple explanation of the problem, which is provided below. I created a calculator activity as a part of a bigger app, and created a theme, and style for different components. yet, when I assign a background color of orange to the "buttonOperator" styles it doesn’t show in the activity on … Read more

Scrollview keeps expanding vertically the more textviews are added into it

All we need is a simple explanation of the problem, which is provided below. So I have a tablelayout and I am using weights to split the rows vertically on the screen. I am dynamically adding textviews into the third row, but as I am doing so, the more of them I add, the more … Read more

Unable to draw a layout on top of a bottom sheet

All we need is a simple explanation of the problem, which is provided below. I have created a custom progress bar and I have added it to the window decorview’s root view. However, when a bottom sheet is visible, this progress bar is drawn behind the bottom sheet rather than drawing on top of it. … Read more

Custom drawable background for Android EditText

All we need is a simple explanation of the problem, which is provided below. I would like to create a custom drawable background for an EditText component in my Android layout. This should include a lower border spanning the entire length of the EditText, and 2 connected vertical lines at either end which take up … Read more

How to set a profile picture if it exists using Glide, otherwise use a placeholder?

All we need is a simple explanation of the problem, which is provided below. I have created a blinding adapter: @BindingAdapter("android:profileImage") fun setProfileImage(imageView: ImageView, profileImage: String) { Glide.with(imageView.context).load(profileImage) .placeholder(R.drawable.placeholder) .into(imageView) } And it woks fine. However, when I request the users from a public API, there are some cases in which the profileImage is null. … Read more