Questions tagged [android-appcompat]

The App Compat Support Library package contains several libraries that can be included in your application. Each of these libraries supports a specific range of Android platform versions and set of features.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

the android app crashes on launch when I use androidx.fragment.app.FragmentContainerView

I'm just a beginner to Android development, I'm reading this book "Head first Android development". I'm supposed to make a secret message app in the chapter 6 of this book and I did exactly ...
Asad's user avatar
  • 1
0 votes
0 answers
34 views

AppCompatActivity not recognising registerForActivityResult

For some reason AppCompatActivity doesn't recognise registerForActivityResult. The wird thing is that AppCompatActivity is defined as an extension of FragmentActivity which in turn extends ...
theblitz's user avatar
  • 6,715
0 votes
1 answer
52 views

Gradle Error: Could not resolve androidx.appcompat:appcompat:1.0.0

I'm encountering an issue in my Flutter project with Gradle while trying to resolve the androidx.appcompat:appcompat:1.3.0 dependency. The error message states: Could not determine the dependencies of ...
Eden Zane's user avatar
  • 105
0 votes
0 answers
20 views

The following classes could not be instantiated: - androidx.appcompat.widget.SearchView and Render problem in android studio

I have two red errors in my activity_main.xml class, one is "Failed to instantiate one or more classes" and the other is "Render problem". These problem arose after I had updated ...
Marfog509's user avatar
2 votes
0 answers
78 views

Cannot set dimAmount for BottomSheetDialogFragment in Android 13+

BottomSheetDialogFragment accepts only dipAmount of 1.0f (non-transparent black background), 0.99f and less are fully transparent background, this seems to be affecting only API 33+. Styles.xml ...
Артём Тарасов's user avatar
0 votes
1 answer
88 views

Proper way of implementing full dark theme in Compose-only applications

I have a Compose-only application that gives users three options of theming: System Light Dark The theme is changed in Activity's onCreate() method by passing darkTheme argument to my app's theme ...
l'hiverviendra's user avatar
0 votes
0 answers
104 views

How to prevent screen "flash" on locale change in Jetpack Compose with AppCompatDelegate?

I added an In-app language picker for my Compose App following this article. but everytime I change the language the screen flashes. I guess it is due to configuration changes I downloaded the sample ...
Márton Gréczi's user avatar
0 votes
0 answers
26 views

Different deprecation warning behaviour for Kotlin and Java projects, when executing androidx.appcompat.app.AppCompatActivity.startActivityForResult

I have 2 projects. 1 is Java, another 1 is Kotlin. Both are using implementation 'androidx.appcompat:appcompat:1.6.1' However, I notice they are calling different function, when I try to call ...
Cheok Yan Cheng's user avatar
1 vote
0 answers
112 views

Problems making changes to the app with per-app language preferences

I am currently implementing a code that I had in another application and that was working correctly, to make a language selector. The problem I have found is that when I follow the same steps, in my ...
Jéluchu's user avatar
  • 404
0 votes
1 answer
433 views

Pin the 5th item of the column or lazyColumn on top of the screen while scrolling the column using android jetpack compose

I am new in android jetpack compose i created a list view using lazyColumn that is working fine but my use case is to pin the 5th or Xth element to the top of the screen while other elements will ...
Arun Aditya's user avatar
0 votes
1 answer
656 views

How to display full screen activity for android (android 13)

I know there are tons of answers on this nd I have tried a lot of them unfortunately, none has worked for me. I have looked through and implemented this and this and a lot more. My device is a google ...
Jamie's user avatar
  • 87
0 votes
0 answers
23 views

How to add a TImeStamp for the Accelerometer Sensor Reading?

I have created a sensor readings in my android application with kotlin. But I want to implement a TimeStamp to notice the timings for every event change in sensors. Could anyone help me please? class ...
Vamsi Krishna M S's user avatar
0 votes
0 answers
25 views

How to resolve You need to use a AppCompat theme (or descendant) with this activity',already using descended of Theme.AppCompat.Light.NoActionBar

I'm Gettiing the error - 'IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity, the activity is already using descended of Theme.AppCompat.Light....
Vikas Pandey's user avatar
  • 1,125
4 votes
0 answers
376 views

Android restarts activity although locales configuration changes are handled by app

I followed the pathway to implement Per-app language preferences in my app. If the user opens the application for the first time, an activity to select one of the available languages is presented to ...
JacksOnF1re's user avatar
  • 3,346
0 votes
0 answers
28 views

Wrong dependency version number showing in gradle

In my android project dependencies are added like this the androidxappcompat_version version defined in root project is 1.4.1. One of the third party library uses 1.0.0 version that I figured out ...
Dhaval Gulhane's user avatar
1 vote
0 answers
191 views

Android: Modern emoji support by upgrading appcompat

I am trying to enable modern emoji support in my app for Android 10 and below. For this I have upgraded AppCompat to version 1.4.0 following this guide. However, modern emojis still don't show up. I ...
FurElise's user avatar
0 votes
1 answer
327 views

Runtime error while running my app IllegalArgumentException: No initializer set for given class

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mikaai/com.example.mikaai.assistant.Assistantactivity}: java.lang.IllegalArgumentException: No initializer set for given ...
Devil's user avatar
  • 3
0 votes
1 answer
354 views

Per-app language is not working on Android 10

I am using per-app languages it is working on other devices but on android 10 it is not working. these are the functions to get and set language. and when user selects other language (french in my ...
user avatar
0 votes
0 answers
51 views

Android Manifest Problem using Aide - Android IDE Mobile

I am using Aide- Android IDE on mobile to create applications but I keep getting this error: Error And this is the code inside: Code I tried to add this to the manifest: tools:replace="android:...
Serella's user avatar
0 votes
1 answer
33 views

How can I change default dialog text color in android bumblebee 2021

I have many alert dialogs in my app. It is a default layout but I am adding positive and negative buttons to the dialog. So the buttons get the default text color of Android (green). I tried to ...
fekhreddine bouziane's user avatar
1 vote
2 answers
2k views

Android 12 ignoring showSoftInput as VIEW is not served

My app worked fine for lots of devices. But since upgrading to Android 12 on my own Pixel the following happens when calling showSoftInput or just when tapping the AppCompatEditText in a Bottomsheet. ...
Merthan Erdem's user avatar
0 votes
1 answer
154 views

Android: how to set button (AppCompatButton) background image depending on its enabled state?

I have created two vector images, say button_active.xml and button_inactive.xml, and added them in drawable folder. I would like to create an AppCompatButton, centered in a ConstraintLayout, its size ...
Another Dude's user avatar
  • 1,284
0 votes
0 answers
99 views

How to correctly migrate custom language setting to AppCompatDelegate.setApplicationLocales()

Currently I have custom language setting in my app, which stores user selected language in SharedPreferences and updates language in Activity.attachBaseContext(). In terms of application lifecycle, ...
devha's user avatar
  • 3,317
1 vote
0 answers
77 views

Fix java.lang.IllegalStateException: 'You need to use a Theme.AppCompat theme (or descendant) with this activity' for specific devices

I get this in crashlytics. I understand we could use AppCompat versions for theme. But why I'm getting this crash only for a certain device? As of now, only one user, Having Android 9 Vivo phones. ...
Vikas Pandey's user avatar
  • 1,125
-2 votes
1 answer
93 views

how I can update SearchView?

I'm using createVoiceAppSearchIntent function from SearchView and this method still using PendingIntent.FLAG_ONE_SHOT and is crashing my app. Causing Targeting S+ (version 31 and above) requires that ...
Wellington Yogui's user avatar
0 votes
0 answers
29 views

Autosize gives different textSize results althought having same width and height in the Layout Inspector

I have two AppCompatTextview's in my ConstraintLayout. I am using app:autoSizeTextType="uniform" attribute to autoSize the textSize according to the width and height of the AppCompatTextview'...
sacacorchos's user avatar
0 votes
1 answer
57 views

Why setSupportActionBar(toolbar) in line 31 is showing error? How could I resolve this?

I tried all the functionalities like creating another private function, and placing findViewById(toolbar) and already tried with placing R.id.toolbar at the place of toolbar inside the ...
Vaibhav Paliwal's user avatar
2 votes
1 answer
74 views

Android: how appcompat and material create appcompat and material views from default?

When you make layouts in Android, you could make default views like TextView or ImageView. But when you use appcompat or material library, they automatically map these views to appcompat or material ...
Rustem Khair's user avatar
1 vote
1 answer
65 views

Why in different themes different buttons are created?

I have an usual button and a theme which is applied to android:theme in AndroidManifest file: <Button android:id="@+id/supperButton" android:layout_width="match_parent" ...
VanechikSpace's user avatar
0 votes
0 answers
42 views

Android App crash on system layout change from seetting

I am facing issue when change some system setting and open my minimized app from background (taskbar) Exact case is, Open my app, then open system setting so my app is minimized Change font size ...
Dev Dhande's user avatar
1 vote
1 answer
1k views

How to access getSupportFragmentManager in ComponentActivity?

I want access getSupportFragmentManager in ComponentActivity. Working with jetpack compose and I need to use a fragment which is available from a third party SDk. Any help/clue is much appreciated. ...
Ali Nawaz's user avatar
  • 2,174
2 votes
2 answers
447 views

Error on some imports on Android Studio for AppCompatActivity and androidx.appcompat.app.AppCompatActivity

I was working in an android project and everything is ok, but when I try to open the project now, I got the some import errors. Take a look in the image below: The code still compiles and I was able ...
fabiobh's user avatar
  • 715
0 votes
2 answers
108 views

What exactly is runtimeOnly on androidx.appcompat:appcompat

I'm working with old version of appcompat, but error after migrate to androidX. implementation 'com.android.support:appcompat-v7:28.0.0' Should i use implementation instead of runtimeOnly ?
omega_mi's user avatar
  • 323
-1 votes
1 answer
522 views

How can I create a usage pie chart in android

I want to make a pie chart in android like this: Please help me out.
Krishna Pandey's user avatar
2 votes
1 answer
3k views

There is no reference to AppLocalesMetadataHolderService in Per-app language preferences Manifet

According to the official documentation of Android, in order to implement the ability to change the language using Per-app language preferences feature and support Android versions lower than 12, I ...
Majid Ahmadi Jebeli's user avatar
1 vote
0 answers
213 views

Getting error java.lang.NoSuchMethodException: android.graphics.FontFamily.<init>

I am getting this error ever since upgrading the SDK version to 30: E/TypefaceCompatApi26Impl: Unable to collect necessary methods for class java.lang.NoSuchMethodException java.lang....
Tum's user avatar
  • 7,037
0 votes
0 answers
1k views

upgrading to androidx.appcompat:appcompat:1.5.0 causing unable to build project

I was trying to upgrade implementation 'androidx.appcompat:appcompat:1.4.2' to the implementation 'androidx.appcompat:appcompat:1.5.0'. But it failed to build/run project showing the following errors ...
AtifSayings's user avatar
2 votes
2 answers
2k views

Android Kotlin - Unresolved reference: AppCompatActivity after updating to 1.5

After the update to 'androidx.appcompat:appcompat:1.5.0' I get unresolved reference in class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener { at ...
IHateGoogle's user avatar
7 votes
1 answer
129 views

Is there a per-app language action to open the settings screen from the app?

To open the notification settings from an intent, we can use the action Settings.ACTION_APP_NOTIFICATION_SETTINGS There are a lot of different actions available to open specific settings screens but I ...
Benjamin Ledet's user avatar
1 vote
1 answer
626 views

Error after updating androidx.appcompat:appcompat

Error after updating androidx.appcompat:appcompat to version 1.5.0 Error: Duplicate class androidx.lifecycle.ViewModelLazy found in modules lifecycle-viewmodel-2.5.0-runtime (androidx.lifecycle:...
cda sa's user avatar
  • 11
0 votes
1 answer
36 views

How do I create an instance of the TabLayout class programmatically?

I want to create an instance of the TabLayout class programmatically for instrumentation testing purposes. Sadly, the TabLayout constructor is throwing an IllegalArgumentException with the following ...
Adil Hussain's user avatar
  • 30.5k
1 vote
1 answer
1k views

Jenkins fails to execute app:processDebugResources with AarResourcesCompilerTransform error

I am trying to run all ui test for my app using jenkins ci/cd, but i constantly run into error, which cause by fail of app:processDebugResources command. When i build project at Android Studio it ...
AShX's user avatar
  • 388
0 votes
1 answer
440 views

How to Remove special Characters from Java String at the end and at the beginning

lets say i have a string like String examplestring = "%,.&/)"hello, mynameis, Fatih-Mehmet!And yours?insidedot.2874d3"(.)§(" And i would want to extract the core part of ...
abdussamed17's user avatar
7 votes
0 answers
2k views

App is crashing when selecting text of webview in Android 11

Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x20c000e at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:285) at android.content.res....
Laxmi Kant's user avatar
2 votes
1 answer
503 views

Black space at the bottom with targetSdkVersion 22 on a device with Android 11

Following bug occurs on a fairly new Motorola Defy with Android 11: I have a weird black bottom bar in my app when my targetSdkVersion is 22 which disappears if I set 24 as targetSdkVersion. The bug ...
OneWorld's user avatar
  • 17.6k
0 votes
1 answer
135 views

Difference between minCompileSdk and compileSdk

Looking at this release note for AppCompat, there is now a minCompileSdk I wonder what is the difference of this from compileSdk
Bitwise DEVS's user avatar
  • 2,661
1 vote
1 answer
165 views

Spinner causing an AppCompat error, but can't figure out what class change

I'm working on a Dialog and getting this error that I'm not sure how to fix. Of course I've searched for others with the same, but the solution given was to change the parent class of the activity. My ...
Kaitlyn Hanrahan's user avatar
2 votes
1 answer
1k views

Android inflate layout crashes after adding fragment container view

currently I have a custom drawer activity that extends AppCompatActivity, which looks like the following: public class DrawerActivity extends AppCompatActivity implements NavigationView....
AhSoHard's user avatar
1 vote
2 answers
1k views

How I resolved the “You need to use a Theme.AppCompat theme (or descendant) with this activity” Issue in Android 12

How I resolved the “You need to use a Theme.AppCompat theme (or descendant) with this activity” Issue. Android 12 issue...
Mubarak Ansari's user avatar
0 votes
0 answers
78 views

Using support library in Android Java

I want to set up Toolbar but when I import support libary, I have a problem: "Failed to resolve: com.android.support:appcompat-v7:32.0.0"
user avatar

1
2 3 4 5
54