I am trying to display a location with a MapView but I can’t get it to work. I have already look into all the other threads with the same questions but the solutions don’t work for me. Here is what is supposed to work but doesn’t: I am new to Android Studio and just trying things out. I also already
Tag: android
Get EditText input values and display some calculation result in an TextView
I have made a very basic weighted average calculator as Android Application (in Java) and it worked fine. The user just inputs 3 values a, b, c in three EditTexts and it calculates formula: Result of this mathematical equation is displayed in a TextView, all of this in the MainActivity at the press of a button. But after creating a
How to save dark mode state in android when the app is completely closed
I have a little problem. When I turn on dark mode in my app and then close my app completely in android, when I reopen it, it returns to light mode. I use AppCompatDelegate to do this. I have a settings fragment with a switch to turn on or off dark mode and it works well. I have a shared
How to link a click handler to a fragment for data binding?
I want to use data binding in a fragment to trigger all my button clicks in handler class. When I run the code below I get the following error. I’m not sure if the problem is with how I’m passing the context to the Handler class or if I’ve done some wrong the Data binding. UserFragment MyClickHandlers fragment_user Answer Your
Migrate an existing app in playstore from java to kotlin
this is more a theoretical question. I have an app that is already in the playstore. This app has been working since the year 2017, so it has a lot of old libraries. The goal is to migrate it to kotlin. So, what’s more effective to achive this goal: Migrate file by file to kotlin Create a new project with
How to fill AutoCompleteTextView in Android with an API call?
I want to try to get a list of food items from an API and update the AutoCompleteTextView based on this. I’ve tried following the answer here but to no avail: https://stackoverflow.com/a/36799955/7429535 This is my code so far: You can see an example API response here: https://api.edamam.com/api/food-database/parser?ingr=red&app_id=8ff4be18&app_key=f2bf020e6d3cf1a9989c2a2163fb720f Currently, this code IS inputting the correct food names into the apiFoods ArrayList
CameraCapturer must be initialized before calling startCapture
Facing this issue while implementing WebRTC in Android: Caused by: java.lang.RuntimeException: CameraCapturer must be initialized before calling startCapture. build.gradle(:app) // Chunk causing problem: CameraCapturer is deprecated. There is Camera1Capturer now available. Answer You need to initialise before you use it
Populate single TextView with multiple SQL columns using SimpleCursorAdapter (Suggestion for searchbox)
I’m using SQL as datasource. My app’s searchbox has autosuggestion, but currently it’s only able to return the results of 1 column (e.g. column1). I want it to be able to search in 2 columns (so, column1 + column2) and show both column’s result in the autosuggestion dropdown. This is the code I’m trying to implement the method with, but
Delete the first 8 rows from an SQLite database
I delete rows in a SQLite table with this: I need to delete the first 8 rows when the database has a size bigger than 8 rows, so: The method Events’s getRowCount is: But When I set the while loop in checkRowSize it delete the all database. Why this? But If I set: It just delete the first row every
Java 11 requirements check failed for JDK 1.8 or greater with Cordova
When I run ““cordova run android“` in the path of my project I get My version of Java My version of javac My version of Cordova My version of Node My version of Nodejs My version of NPM My version of Gradle I found that android-studio –version didn’t do anything but silently wait, but when I open the program through