How to dismiss Bottomsheet on Click in ViewHolder RecyclerView Adapter?

I want to dismiss my BottomSheet on Click of cardView in BottomSheet Here is my code of onBindViewHolder class Viewholder extends RecyclerView.ViewHolder implements View.OnClickListener{ …

How do I only allow the user to enter sensible height and weight values in Edit Text? Java

I’m making a super simple BMI calculator app using Java in android studio but I’d like to make it so that the user is only able to enter sensible values for their height and weight. I was thinking …

Activity does not have a NavController set on

I basically set up 3 fragments for my bottom navigation view with all linked to activity.xml activity.xml where I put fragment tag.

How to enable adding bookmarks in android webview

I am creating a browser app for android and I want know is there any code that helps to enable adding bookmarks in android webview.

Android onclick listeners not recognized in drawer/sidebar template

On creating a new project in android studio, I chose the drawer template: I began working on my project and in the XML file (fragment_home.xml), I added an onclick listener to a button in the …

Java create a TextView without open new window

This is my code: LinearLayout linearLayout = new LinearLayout(this); setContentView(linearLayout); linearLayout.setOrientation(LinearLayout.VERTICAL); // Open new window …

Is there a way to make “folded code” stay folded in Android Studio?

I would like to keep code folded once I’ve folded it. When I’m done with a window of code for an Activity I close it. Then when I come back to it, all the code opens up again… Would be nice if it …

How to do translate animation of button in Android Studio?

I am trying to move a button from one site to another. I manage to move it but when it moves, I have to click on the place where it was before instead of hitting the button. Why does this happen? This …

I am trying to run the app on my Android 10 device and the following error is shown – minSdk(API 30) > deviceSdk(API 29)

I am trying to run the app on my Android 10 device from the Android Studio and the following error is shown – 10/17 09:16:05: Launching ‘app’ on Physical Device. Installation did not succeed. The …

how to stop the web view and display a reload message if the page does not load for 30 seconds?

I have a web view and i have this code (P.S i am a beginer in programming) private WebChromeClient getChromeClient() { return new WebChromeClient() { @Override public …