I’m using the navigation architecture component in my single activity app and it works fine but what I’m facing is that in one of the fragments I need to have another fragment that takes about 60% of the initial fragment size (60% of the nav host fragment). How can I achieve that? Answer I now cha…
Tag: android
How to verify user purchase for a non-consumable product on app launch
I just completed setting up inapp billing using google play billing with aidl. On successful purchase the premium feature is activated through a boolean. But after the app is closed and relaunched, premium feature disappears. i.e the boolean reverts to false. I would like to know how to ensure the boolean sta…
How to set visibility for include layout in databinding?
I have implemented data binding in my project. I have a particular screen with two nested layouts in include tags. I couldn’t change the visibility for include layouts using data binding programmatically. However, I have achieved it through a boolean, but my question is how to set visibility for that in…
Unable to scroll to top in android WebView
Am working on my first project in android, Since am creating a browser i added progress bar and swipe to refresh option. when i scrolled to page bottom then i tied to scroll to the top of the page but swipe refresh option is triggered, when i tried to scroll to top. Problem: unable to scroll to top of the
How to extract all the URLs from the text in android
I want to get all the URLs from the given text using Patterns.WEB_URL.matcher(qrText); What I want to do: I am scanning a QR code, open the link in webView if the link contains link which contians the word “veridoc” showing in textView if the text scanned is not link or another link that does not …
how to use Navigation component navhostfragment while altering full screen/above bottom Navigation
I’m using the single activity multi fragments with navigation component.how do i hide the bottom navigation bar for some of the fragments? i tried the following: controlling the visibility of the bottomnavigation bar through databinding.(buggy) toggling the bottomnavigation visibility before opening the…
Android app crashes when minifyEnabled is true
I am using a multi-module app and the app crashes when minifyEnabled true in the installed module’s build.gradle. Following is the deobfuscated stacktrace I retrieved from play console. FATAL …
How do I get the first and last initial/character from a name string
I am trying to extract the first character of both first and last name from a string but have had no luck so far.( tried searching multiple solutiosn online, no luck either) So for example, if this is the string: I want to display just A and E ( say AE). I am trying to figure out if theres an
Chaquopy in Android Studio module not found
I have implemented Chaquopy into my Android app to make use of pre-trained Neural Network models in python. Trying to call the python code, I am encountering; “com.chaquo.python.PyException: ModuleNotFoundError: No module named ‘DataLoader’ I am unsure if I have wrongly implemented the file …
Can’t find the Mistake in my Cursor initialization
And for a bigger APP project I need to work with an SQLite database. If my code works I don’t get any data back. And I think I just don’t understand the cursor object. In this code I simply want to get a firstname back but it sasy that my cursor is not initialized correctly, but I got the basic