Let’s say i’m having a database which includes a table like this: CREATE TABLE tbl_EX (_id TEXT, TIME TEXT); And then I insert a value like this: After that, I try to query. Without WHERE clause: It retrieved me all records as expected, which are shown in 2 TextView like this: BUT, when I make que…
Tag: android
Scaning QRcode from image (not from camera) using ZXing
I am using the ZXing library for barcode scanning. I want to scan a barcode using this library from an image (e.g., on the SD card) rather than from the camera. How can I do this using the ZXing library? Answer I wanted to test it out before posting it so it took me a while, I’m also using ZXing
How to implement hiding the toolbar when scrolling WebView?
I have an Activity with WebView and my own AppBarLayout. I want to implement hiding/showing the AppBarLayout with animation when scrolling the WebView, like in the Google Chrome app. I tried different ways. ObservableWebView, but it doesn’t work correctly, it doesn’t always show AppBar, especially…
Change height for textedit depending on amount of text
So im trying to build chat and the textEdit where you write your message. I want to change height depending on amount of text. a good thing to know also are that this is in a fragment. Like in messenger or normal messaging apps. Kotlin: XML: Answer I fixed it by setting layout params every time the text chang…
How to start activity from another module
I have two modules. App and module Test. Module app contains MainActivity with button. Module Test contains MainActivity two. I want to run Test/MainActivity from module app by click on button. But Android still cannot see MainActivity from module Test. See below. Module app Manifest: Module Test manifest: Co…
How to remove an item from List?
I’m developing an app, which contains a list of tickets, there are add ticket and remove ticket options for the user. The add option works fine, but the remove option doesn’t, here is the ticket list code The delete function in another activity which doesn’t work: While the add function work…
java.lang.IllegalArgumentException: Cannot create PhoneAuthCredential without either verificationProof, sessionInfo, ortemprary proof
This Exception is taking place in my code help please. my all code is posted below. How to resolve this issue before I updated ui version 4.0.1 to 4.2.0 and also update 4.3.1 but not resolve this issue I have passed too many days on this issue but not resolve please help . Here is my code my gradle file
Geo Intent Label not showing in Google Maps App
Since my Google Maps app updated recently, now version 10.11.1, the following code does not show the label as expected, documented, and previously working: And neither does this version (with 0,0 immediately after geo:): Neither does the example code in the official documentation show a label: Answer Update: …
How to populate a spinner with the result of a Firestore query?
I am creating a spinner which will show the subject name. The subject names are stored in my Firestore database as follows: I could fetch the result to an RecyclerView but unable to help myself to do so for spinner. Answer To solve this, please use the following lines of code: The result will be a spinner tha…
Are Enum classes in Kotlin “expensive” for Android as in Java?
Are Enum classes in Kotlin “expensive” for Android as Java?. Is it still stand to use @IntDefs or @StringDefs in Kotlin?. When I decompile Kotlin Enum class to Java class, there still used Java Enums in the low level, which are not recommended for use in Android Development, and this made me think…