Category "android"

How can I get onTouchEvent in Jetpack Compose?

In normal view, we can have onTouchEvent override fun onTouchEvent(event: MotionEvent?): Boolean { when (event?.action) { MotionEvent.AC

Grid layout manager with dynamic item

I use grid layout manager but not working good for dynamic item What I want: or just like And What it shows:

BatteryManager's BATTERY_PROPERTY_CURRENT_NOW returning 0 or incorrect current value

I am using using BattteryManager on android to get the discharging/charging current on my app. But I've notice that although it works on many devices, but in so

How to create accessible focus groups in ConstraintLayout?

Imagine you have a LinearLayout inside a RelativeLayout that contains 3 TextViews with artist, song and album: <RelativeLayout ... <LinearLayout

AAPT error: resource drawable/... not found

After recently upgrading my android studio, I am not able to build my project anymore. Every time I execute a build, I am struck with the following error: err

Billing service unavailable on device. (response: 3:Billing Unavailable)

I've been struggling with this problem for days now. I know there are a lot of questions with the same problem on SO but i couldn't get it to work. What I have

Unresolved reference: title & Unresolved reference: overview

I've got error of Unresolved reference: overview & Unresolved reference: title after I added List<Result>, as for separating code inside folder after

Composable not recomposing when ViewModel updated from a different Composable

I am developing an Android app using Jetpack Compose. The app shows a list of items. It also has a top bar containing a search bar. We have 3 composable: the li

When I am scrolling up SwipeRefreshLayout refreshing my app

I am created an app that downloaded some data from internet and show them in a list using recyclerView.So I added SwipeRefreshLayout so that when user is at the

How to get day,month,year from String date?

I have a date on String, like this: String date="25.07.2007"; And I want to divide it to: String day; String month; String year; What is the best way to do

ListView Multiselection

I tried to implement the multiselection on Android ListView. I want to select/deselect more than one item and these items should keep highlighted or not. I don'

Android transition animation does not work in API below 26

I tried to create a profile preference like WhatsApp where the profile photo is shared with the profile activity. I used the following code which works properly

Which permissions are required for Flashlight?

I've used <uses-permission android:name="android.permission.FLASHLIGHT" /> but my app keeps crashing. I'm making a Torch app. Here's my Manifest code: &l

How to include a portrait layout in a landscape layout?

I have designed the perfect portrait layout. I'd like to include is as a part of the landscape version (see attachment). There is no extra functionality, so

Android not make GET request after app closing from Service

First of all sorry if such sort of question is already asked before. I want to make a app which make a GET request or Simply Open A URL to tell server that app

ViewPager menu icon delay when swiping

When swiping between tabs on my application, the menu icons have a distinct delay before they appear. If I click tabs, rather than swiping, they update immediat

ViewPager menu icon delay when swiping

When swiping between tabs on my application, the menu icons have a distinct delay before they appear. If I click tabs, rather than swiping, they update immediat

Intent Filter with android:autoVerify="true" - never verified at installation, default app links don't work

I'm using branch.io SDK in my Android app and want to make my app a default handler for branch links on Android 6 as described here(Android guide) and here(Bran

Android Volley getParams() method not getting called for JsonObjectRequest

I have overrided getParams(), and mEmail, mUsername etc. are globally declared. @Override public Map<String, String> getParams() throws AuthFailureError

Android not make GET request after app closing from Service

First of all sorry if such sort of question is already asked before. I want to make a app which make a GET request or Simply Open A URL to tell server that app