Android: combining text & image on a Button or ImageButton

I'm trying to have an image (as the background) on a button and add dynamically, depending on what's happening during run-time, some text above/over the image. If I use ImageButton I don't even...

GridLayout (not GridView) how to stretch all children evenly

I want to have a 2x2 grid with a buttons inside. This is only ICS so I am trying to use the new GridLayout given. Here's the XML of my layout: <?xml version="1.0" encoding="utf-8"?> <GridLayout...

How to pass a variable from Activity to Fragment, and pass it back?

I am currently making an android app, and I want to pass a date between activity and fragment. My activity has a button, which opens the fragment: DatePickerFragment. In my activity I show a date,...

Save an image to a mobile phone gallery from a browser

So this seems unlikely purely from a security point of view, but I need to cover my bases. Has anyone come across a method for saving an image in a browser to the user's gallery? In this case, I'm...

How to close the current fragment by using Button like the back button?

I have try to close the current fragment by using Imagebutton. I am in Fragment-A and it will turn to the Fragment-B when I click the button. And when I click the button at Fragment-B , it will...

How to avoid multiple button click at same time in android?

I'm using two button in view. While clicking two button simultaneously it will goes to different activity at a time. How to avoid this? I have tried like this, But its not working please...

WRAP_CONTENT not working after dynamically adding views

I'm trying to create a fragment that lays out a series of custom views dynamically. The main content for this layout is a RelativeLayout nested in a LinearLayout (to center it horizontally),...

Android Data binding : Cannot resolve symbol

I have tried to use the beta features(data binding) in the android studio. After following the guides from the android studio, I can find the related class DataBindingInfo in the android studio....

Sharing Bitmap via Android Intent

In my android app, I have a bitmap (say b) and a button. Now when I click on the button, I want to share the bitmap. I am making use of the below code inside my onClick() to achieve this :- Intent...

disabling multitouch across the appwide in android xamarin

Xamarin forums question link: https://forums.xamarin.com/discussion/60321/disabling-multitouch-across-the-appwide-in-android-xamarin#latest Is there a way to disable multi-touch App wide in...

comparing a input string to string in a database

I'm studying Android studio and started with databases this week. I would like a little help with this app. It is simple. The user enters a string and presses a button in the first activity. This...

BroadcastReceiver not firing on notification action click

I am trying to create a simple notification with a button (action) defined to it. I have managed to display it properly and create a PendingIntent for my action. I have also created a...

How to dynamically change html5 video source?

I'm using flowplayer to render live videos. On button click, I want to dynamically change the src (video url) to a different url. This needs to work well on most of the mobile devices (ios and...

Android webview crash "Fatal signal 5 (SIGTRAP)"

I have an app with a web view in which I load HTML content with JavaScript enabled. The web view is inside a fragment. This is how I initialize the web view inside the method onCreateView of the...

Android button has setOnTouchListener called on it but does not override performClick

When I try to add onTouchListner() to a button, it gets me the Button has setOnTouchListener called on it but does not override performClick warning. Does anyone know how to fix...

How to truly avoid multiple buttons being clicked at the same time in Xamarin.Forms?

I am using multiple buttons in a view, and each button leads to its own popup page. While clicking multiple button simultaneously, it goes to different popup pages at a time. I created a sample...

How to save and restore scrolling position of the RecyclerView in a fragment when coming back from other activity to the same fragment?

Request to moderators: This is not a duplicate question, please read the below information. Before asking this question, i'd tried almost every available solution on SO, but none of them worked...

DataBinding: Adjust visibility by LiveData Variable on Click

I want to adjust the visibility of a ProgressBar depending on a MutableLiveData variable in my ViewModel. I learned that MutableLiveData does not work, so I need a LiveData variable to transform...

Xamarin form: How to change the back button color

How do i change the back button of the navigation bar on xamarin form on both iOS and android? There was text color but can't find for back button

No MaterialLocalizations found - MyApp widgets require MaterialLocalizations to be provided by a Localizations widget ancestor

I was just trying to create an app with button which shows an alert message when the button is pressed. But it gives me this error(Mentioned below). I wrote this code by taking reference of this...

Android how to set background color on a Button

I am trying to change the background color of a Button. I'm in Kotlin on SDK 21 on emulator. A View and a Button are declared in the layout XML file <View android:id="@+id/myview" ...

Unable to start activity ComponentInfo{}: android.view.InflateException: Binary XML file line #11: Binary XML file line #267

In some phones the following error is occurring. I am not able to identify the problem by reviewing the log details. log details and xml file contents can view below. java.lang.RuntimeException:...

Error inflating class android.fragment.app.FragmentContainerView, can someone tell me what I'm missing

I'm working on getting the Google Place API to appear within a CardView. The particular code I'm looking at is from GitHub, seems to be working for everyone else but I don't understand why it's...

How to run with the Android Test Orchestrator from Android Studio IDE instead of command line

I would like my tests to use the Android Test Orchestrator when I run from Android Studio but the documentation only describes running it from the command line: ./gradlew connectedCheck I prefer...

Dynamically change android's accent color

I set Android's accent color to grey, so it would look normal in any theme (light or dark). And gray works great for edit control for example, but it turns out that is also used in alert cancel...

Error in android phones with midas Delphi 10.4

I am working with RAD Studio 10.4 to develop mobile applications, I connect with DataSnap from an Android mobile and a couple of days ago I have not been able to connect the app because it...

Can't send bluetooth from Kivy App on Android

I put together a Kivy App that gets the coordinates from a user touch and sends them over bluetooth to an arduino I am following the steps on how to handle bluetooth on android listed in the link...

CocoaPods could not find compatible versions for pod "RNDateTimePicker"

when I start pod install the result : CocoaPods could not find compatible versions for pod "RNDateTimePicker": In Podfile: RNDateTimePicker (from...

Cannot open camera using cv2.VideoCapture(0) in android phones

I need to create an android application using OpenCV VideoCapture() method with python kivy framework. Please note I'm not going to use KivyCamera available on Kivy, because I need to draw some...

Android overlay window using jetpack compose

I need to develop an android library that should be able to allow the developer, who is using my library, to show an overlay window on top of his current screen. I can use popup overlay for this,...