• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

kotlin/jetpack search list

I am looking for some advice on an app I have been developing over the last couple months. In an abstract explanation, the app's main screen (MainScreen()) shows items that the user has added. There is an add button which loads an add screen (AddScreen()) which by default shows all possible items that can be added. I have a search text field with a filter list underneath and have implemented some logic that has them work together to only show items that match both the search and filter criteria.

Currently, I am using just a regular mutable list to hold items that should be displayed. If there's nothing in the search text field and no filters are selected than we just assign the entire list (defined in a view model) to the regular mutable list in AddScreen()

Code:
val resultsList = mutableListOf<whatever>()
...
if (dontFilter && dontSearch)
    resultsList = viewmodel.itemMap.values.toMutableList()
else {
    // do search/filter logic
    resultsList.add(whateverItem)
}
LazyColumn(items = resultsList) {
...
}

the variables that are associated with the search text field (onValueChange) and filters (onClick) are all state variables but should the resultsList be a state variable defined in the view model as well?

I have a random bug that I am trying to find but cannot seem to reproduce when I try. It may have something to do with process death but after I have added an item from AddScreen and then click add to load AddScreen again, the list sometimes does not show all possible items (all of ItemMap.values in above example), even though the search text field and filters have been cleared.

I need to pay more attention to whether this happens after I am using an already running an instance of the app (and process death may have occurred) or if it is a new instance... I am thinking the former though because it always seems to happen when I am quickly trying to show someone else the app (naturally...) as opposed to me restarting an app while testing after a code change.

Any advice?

How to recover accidentally erased Camera folder from Samsung S21 Ultra - Data Recovery Android 12 / Root?

All I can say is to please have a back up plan in place waay before you reach several gigs worth of photos. The time it takes to be proactive in this matter is priceless...
Like I said, I do have plenty of backup there were not years of pictures wich it unfortunately was for OP I just take a lot of photos haha. Thanks for input.

Help YouTube thumbnail playlist is gray

as of a month or so ago, my Note 10.1 from 2012 now only loads m.youtube.com in Chrome, despite it being one year older than the Samsung browser built-into it.. the Samsung browser skeleton loads now. I think whenever the thumbnails went rounded corner UX it broke the browser since it apparently fails at drawing them and gets into a javascript error loop in the background. If i go to Google on Samsung's browser and search for specific content under 'videos' it will load the video itself and even play it, but the rest of the site is still stuck skeleton loading, with blank icons everywhere, the player UX also not drawing the rounded corners even if it otherwise works, and pausing the video won't allow resuming, as audio continues but video is frozen at that point. the scrubber bar is also MIA.

Chrome version 24, from literally October of 2013, still works with m.youtube.com, and draws the exact same layout as Samsung internet once did, albeit with the rounded corners. Either they blacklisted Samsung Internet because it's not Chrome and because it's an otherwise AOSP-based browser, or the rounded corner UX broke it. But the fact that even the oldest Chrome version for Android, literally the first version APK works fine, leads me to believe the former.

Not more goo

they are large because they are modern versions. Or they got updated behind your back. I noticed once that even if I never set up Play Store, it still tried to 'update' specific apps, mainly Google apps. Even with updates turned off, they still update select apps, unless you disable download manager in system which breaks Play Store and is one of the first things I do on a new or used device.

CyanogenMod peaked at 7.1, based on 2.3 Gingerbread. Nothing Lineage makes even comes close to the level of deep customization baked into CM 7.1. Custom ROMs are mosly just unofficial updates at this point.

I still have my Nexus 6, which has VoLTE hardware support, but nobody makes a 2.3-based ROM for it. XDA laughed at the suggestion, even when I said I'd pay for development if needed. It's like everyone wants to forget that era of Android completely. Android today is a bad iOS clone. I mean, sure, I made a convincing imitation of Sense 3 + TouchWiz UX on my Z Flip 4, because Samsung bakes in a lot of stuff that comes closer to the baked in options in CM 7.1, but it's always going to be half done. I cannot get the Gingerbread lock screen, status bar style, or launcher UX.

How many people even bother with a Wii or 3DS at this point? Because a few devs managed to resurrect WiiNet24 and many of the built-in apps on the Wii, including Forecast Channel, multiplayer backend, and Everybody Votes, and on the 3DS they resurrected MiiVerse, muliplayer, the friends system, EShop, and much more in homebrew. The 90s internet is able to be browsed from a Windows 95 PC running Internet Explorer 5 for crying out loud thanks to the Old Net. So why can't I use Android 2.3 today? Or have someone bring back Android Market since it's not Google's but open source in the first place? I think it would have been great to have F-droid use Android Market and its UX for a front end. That's no different than having eshop back on 3DS because it just redirects the requests to a spoofed API that makes the app think nothing has changed.

Android Studio | No Play store in my virtual phone

Hi
Not sure if this is the correct section but does anyone know much about Android Studio?
I googled on ways how to emulate android phone so I can test intune mobile device management stuff

I followed this guide and it was pretty easy to set up:

Setting up an Android Emulator for testing Intune features - Azure Cloud & AI Domain Blog

Overview As more customers leverage either standalone Microsoft Intune or Microsoft Endpoint Manager for cloud management of their devices they also seek an efficient means to upskill administrators on Intune features and capabilities without the need to purchase devices upfront for testing...
azurecloudai.blog
azurecloudai.blog

I made a Google Pixel 7 with Android 11 and picked an image with google play like the guide says

But when I launch the virtual phone it doesnt have the google play app installed ( even thought I made sure I picked it)
is there anything else I may have missed?

Also is it possible to take "snapshots" or save the current state of the virtual phone and revert back to it just like a virtual machine snapshot?

If anyone knows much about setting this up in Android studio I would appreciate any help

Braille talkback

Hi,I am new to android development ,iIwant to integrate braille display which is an inbuilt feature in android phones and also in braille display there is a specific scan activity which scan only the braille devices like orbit reader ,the main question is what is the packet that the braille devices(orbit reader) uses to advertise itself so that it is shown in the scan results.I want the information about the advertisement packets that the braille device utilizes especially for orbit reader 20 which is also a braille device that reads the screen and displays the information in braille language.

Need odin files 4 galaxy a7 2018

Need Odin files 4 galaxy a7 ans SO Android 12 . I want update galaxy a7 2018 to Android 12
you can't. its only upgradable to android 10. even rooting the phone, you can't upgrade it to android 12.....sorry but you can either deal with what you have or upgrade your phone with a phone that is on android 12.

What's your favorite plant?

I mowed a fine lady's lawn for almost three decades before she passed being 98. Through all of those years she had a cast iron urn full of hens and chicks on her patio. The chicks eventually took over her patio... gathering dust until they could continue their takeover. I mowed the lawn another summer for the daughter as she cleaned out the house and eventually sold the property.
She asked if there was anything I wanted to remember her mother and I asked for the urn of hens and chicks. They were as hearty as her mother and to my knowledge had zero care. The urn is now on its second summer on my walk outside my patio. If I have a love for any plant, those hens and chicks bring a smile on my face every time I see them.
Hens n Chicks.jpg

Filter

Back
Top Bottom