56
Stay up-to-date with latest news on Android Development! Content directly fetched from the subreddit just for you. Powered by : @r_channels
How can I create a certain amount of buttons at runtime and put them in a ScrollView so that the user can scroll and select one of them?
Hello.
I'm making a project manager app and one of the functionalities I want to implement is that, at boot, the app reads through the database and creates one button per project the text of which is the name of the project. I have no idea however how to dynamically create a button, give it the style I want and put it in the ScrollView, I have tried looking online too but surprisingly I haven't had much luck, can you help me? Here is the Kotlin code of the part where I iterate through projects, one of the TODOs is where the buttons should be created and put in the scrollView
val projectScroller: ScrollView = findViewById(R.id.projectScroller)
// ...
var projects: MutableList<Project> = mutableListOf()
try
{
val projCursor: Cursor = database.getAllEntriesFromTable(GameDatabaseHelper.PROJTABLE)
if (projCursor.moveToFirst())
{
do
{
val name: String = projCursor.getString(projCursor.getColumnIndexOrThrow("name"))
val descr: String = projCursor.getString(projCursor.getColumnIndexOrThrow("description"))
// TODO: Once implemented in the DB, add a functionality to read the characters and other important voices for projects
val project: Project = Project(name, descr)
projects.add(project)
// TODO: Implement functionality that adds button to the scrollview
} while(projCursor.moveToNext())
}
else
{
Toast.makeText(this, "ERROR READING FROM DATABASE: Invalid table or db is empty", Toast.LENGTHSHORT).show()
}
projCursor.close() // I suppose?
}
catch (e: RuntimeException)
{
Toast.makeText(this, "ERROR: projects table doesn't exist", Toast.LENGTHLONG).show()
}
And this is the XML code of the activity
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layoutwidth="matchparent"
android:layoutheight="matchparent"
android:background="@color/bckgrgray"
tools:context=".MainActivity" >
<ScrollView
android:id="@+id/projectScroller"
android:layoutwidth="409dp"
android:layoutheight="599dp"
android:layoutmarginStart="1dp"
android:layoutmarginTop="64dp"
android:layoutmarginEnd="1dp"
android:layoutmarginBottom="64dp"
app:layoutconstraintBottomtoBottomOf="parent"
app:layoutconstraintEndtoEndOf="parent"
app:layoutconstraintStarttoStartOf="parent"
app:layoutconstraintToptoTopOf="parent">
<LinearLayout
android:layoutwidth="matchparent"
android:layoutheight="wrapcontent"
android:orientation="vertical" />
</ScrollView>
<TextView
android:id="@+id/yourProjectHeader"
android:layoutwidth="wrapcontent"
android:layoutheight="wrapcontent"
android:fontFamily="sans-serif-condensed-medium"
android:text="Your Projects"
android:textColor="@color/lining"
android:textColorLink="#A41515"
android:textSize="32sp"
app:layoutconstraintBottomtoTopOf="@+id/projectScroller"
app:layoutconstraintEndtoEndOf="parent"
app:layoutconstraintStarttoStartOf="parent"
app:layoutconstraintToptoTopOf="parent" />
<Button
android:id="@+id/addProjectButton"
android:layoutwidth="wrapcontent"
android:layoutheight="wrapcontent"
Friday. It's over
https://redd.it/1qxsuwd
@reddit_androiddev
Vibe coding mobile apps with Compose Driver
https://dev.to/jdemeulenaere/vibe-coding-mobile-apps-with-compose-driver-3379
https://redd.it/1qxpxmk
@reddit_androiddev
I built a complete Expense Tracker Android app using Jetpack Compose (MVVM)
https://redd.it/1qxlgh5
@reddit_androiddev
Is this some kind of scam?
https://redd.it/1qxjm13
@reddit_androiddev
Features request for this app (Radiodroid)
I don't have coding skills so I tried requesting this to the author of the app then tried AI coding but none were helpful.
I need to add these features without removing the current ones https://github.com/segler-alex/RadioDroid
1. manual internet radio station adding as radio browser portal keeps altering its database so I need to keep saved some of stations locally on the device
2. importing saved fav stations changes their order, it can be time consuming when having more than one device and over 100 station to re-arrenge on each. so can this be also fixed
https://redd.it/1qxe0sx
@reddit_androiddev
PixelWanker
I’m happy to share that PixelWanker just passed Google Play review and is now available 🎉
It’s a simple Android utility that puts a customizable grid overlay on top of any app, so you can quickly verify spacing, alignment, and visual rhythm on a real device (across different screen densities) — without guessing.
https://preview.redd.it/t1oht1xgquhg1.jpg?width=591&format=pjpg&auto=webp&s=2def1a05ce7e06866ee2bb72d4b37e917310dd99
https://preview.redd.it/4qhih4d7quhg1.jpg?width=591&format=pjpg&auto=webp&s=0ac71f39307b7cf30ed5f925bb1179937c47b1cc
What it does:
overlays a grid over any app/screen
grid step in dp or px
adjust color / opacity (plus extra visual modes if enabled in your build)
quick toggle on/off while testing
If you try it, I’d love feedback:
What grid presets would you want?
Any features you miss immediately?
Play Store: https://play.google.com/store/apps/details?id=com.pavlovalexey.pavlovAlexeySandbox
https://redd.it/1qxe9jj
@reddit_androiddev
Shoutout to everyone for helping with the AGP 9 tracker
https://agp-status.frybits.com/agp-9.0.0/
https://redd.it/1qxc27g
@reddit_androiddev
How to turn off this pop up
https://redd.it/1qx8rqg
@reddit_androiddev
Created an open-source web-app to localize Android/iOS metadata
Hey, I know it's already possible to localize metadata with play console, but you can't localize your screenshots for example. So I created a tool to actual help you to do that. The Android part is brand new, please don't hesitate to give a feedback!
https://github.com/fayharinn/StoreLocalizer
https://redd.it/1qx6gqt
@reddit_androiddev
ARM64 Android Dev Kit
https://github.com/denuoweb/ARM64-ADK
https://redd.it/1qx144h
@reddit_androiddev
I started working on an app for people with anxiety
Hello, I'm a Computer Science student. I wanted to make an app but I had no idea what to make but I recently came up with an idea and started it.
The app is called Grounding (name is still in progress) and it's going to be an app for people with anxiety who get easily overwhelmed to ground themselves. The idea is that the first screen when opened will be a screen that allows the user to select the intensity of their feeling of overwhelmed. Depending on the intensity selected the user will then be presented with different mental exercises.
Some of these exercises are:
5-4-3-2-1 Grounding
Box Breathing
Progressive Muscle relaxation and more
For this app I plan on working with real licensed therapists and people in the psychology field to get some ideas and professional input. I plan on showing a demo of the app when more has been added. I really love this idea and I hope it will help people. Feel free to ask questions or give some input!
https://redd.it/1qx218e
@reddit_androiddev
Sponza Classic for Android V5.5 Tech Demo
I've been working on a high-performance rendering test using the Sponza Atrium. Everything you see is Full Real-time (no pre-baked lighting).
My main goal is achieving a "console-look" on budget devices, with the Redmi Note 9 as the minimum hardware target. Optimized with custom HLSL shaders in Unity 2021.3.
Check it out here: https://www.youtube.com/watch?v=3ctF3l366hI
https://redd.it/1qwza2o
@reddit_androiddev
Handling step sensor & background service issues on aggressive Android OEMs - looking for dev experiences
Hi everyone,
I’m the developer of an Android step-tracking app called Simple Stepper, and I’d like to get some input from other Android devs regarding background execution and step sensor reliability on certain OEM devices.
Recently, the app received a couple of negative reviews stating that:
steps were not counted at all, or
the background service had to be restarted frequently
This seems to happen only on specific OEMs with aggressive battery and background restrictions. Unfortunately, the reviewers never responded to follow-up questions (neither via Play Store replies nor support), so I couldn’t gather device details or logs. I can’t fully rule out user error or even fake reviews, but I’m treating the issue seriously.
# What I’ve implemented so far:
Foreground service with persistent notification
Explicit onboarding warnings for known problematic OEMs
Clear guidance to exclude the app from battery optimization / background restrictions
App category set to Health on Google Play
Fallback to Google Health Connect if direct step sensor access is unreliable or blocked
Manual guidance when OEMs block direct access to the relevant system settings
Despite this, I’m aware that on some devices the system can still terminate services or limit sensor access unpredictably.
# What I’d love to hear from you:
Have you seen similar behavior with step sensors or long-running services on certain OEMs?
Are there any additional mitigation strategies that actually helped in production?
How do you personally deal with negative reviews that provide no actionable information?
Is there anything fundamentally different you’d recommend when targeting fitness / health-type apps on Android?
My goal here is to better understand real-world constraints and improve robustness - and ideally help others facing the same issues.
Thanks a lot for any insights or shared experiences.
https://redd.it/1qwukk1
@reddit_androiddev
How to exclude baselineProfile generation
Hi,
in a Multi Module, it want to exclude the generation of Baseline Profiles when i invoke :
connectedAndroidTest
The baseline profile test fail for emulators on purpose, also on CI/CD i dont want that to run them as those take a long time.
Anyone can share some Idea how to avoid this ?
https://redd.it/1qwttqz
@reddit_androiddev
Why doesn't Netflix provide an arm64-v8a APK?
Hey everyone,
I was looking into Netflix's APKs and noticed that they don’t seem to offer a separate arm64-v8a build—only universal or armeabi-v7a versions.
Does anyone know why that is? Is it a technical limitation, or do they just rely on the Play Store to deliver the right build automatically?
Any insights would be appreciated!
Thanks in advance 🙂
https://redd.it/1qxpks0
@reddit_androiddev
Released a crypto paper trading app — already ranking #19 without ASO. Would love feedback
https://redd.it/1qxpmqp
@reddit_androiddev
Weight loss ap thats built like flo
https://redd.it/1qxokw7
@reddit_androiddev
Android dev as co-founder for an Agentic AI smartphone company (INDIA based)
Hi guys, we are looking to hire an android developer in tech co-founder role. Should have strong experience building across Android and most importantly have integrity. No place for cunning over smart people. Should have abundance mindset (a giver rather than a taker)
https://redd.it/1qxkx8q
@reddit_androiddev
Need tips for where to deploy the app before publishing to playstore.
Hey folks, i have built a fitness app , using flutter/nodejs/mongodb. I intend to publish it on playstore, but the main issue is free/cheap deployment service. I have researched about aws,render/railway, but due to lack of any guidance, am unable to decide which one is the overall best(cuz render free tier where i am currenly hosting is causing sleep over inactivity.)
Please drop your suggestions , and also if you want to review my app , you are most welcome :)
https://redd.it/1qxhyji
@reddit_androiddev
What's the correct way to save inherited data structures with different parameters in an SQLite database?
Hello.
I'm making a uni project and using the SQLite framework included with Android Studio to memorize data on disk and read it back, I am also very new to SQLite, and I have the following problem:
I have to memorize a series of Characters in a table for a game project manager app, these characters (instances of a class Character) can be uniquely identified by the name of the project they belong to and their own name, they also have other attributes like aliases, backstory etc, I defined the table of characters as follows:
db.execSQL("CREATE TABLE $CHARTABLE ((prjname TEXT, name TEXT) PRIMARY KEY, aliases TEXT, " +
"species TEXT, birth TEXT, age TEXT, aspect TEXT, personality TEXT)")
// Backstory is yet to be added
However, I also have a couple of subclasses inheriting from the Character class, namely GameCharacter which introduces MaxHealth as a UInt, RPGCharacter which inherits from GameCharacter and introduces CurrentHealth as a UInt and Owner as a String, and I plan to have even more subclasses which may not inherit "in a straight line" (for example, I could have another class inherit from Character but not from GameCharacter), and I am a bit of an impasse here because it would be handy to be able to save all these characters in one table without loss of data.
So I wanted to ask, what is the correct way to do it? I don't think obviously I can just define every single field for each and every subclass in the same table, so what can I do? Or should I define different tables for each subclass?
https://redd.it/1qxf8sh
@reddit_androiddev
What can and can't a launcher do?
Hello, complete novice in android development here.
I have very specific ways I'd like to customize my phone, and with some programming background I hope I could read enough guides to get me where I want, I just want to know it's possible first.
What I want to accomplish is basically a state in which the phone always displays the keyboard, and uses the remaining part of the screen as the "full screen". Essentially recreating the look and function of an old BlackBerry.
I've seen people make custom "launchers" to make their phones look all sorts of cool ways. Is a custom launcher a way to accomplish what I want? Does the launcher only function outside of apps, or can I maintain this always-on keyboard and small display behaviour in apps?
Is there any other way to accomplish this? Maybe there are some settings I could mess with?
https://redd.it/1qxdfka
@reddit_androiddev
How and where to start with kotlin/ android app development??
Hey I want to start with android app development
Can anyone give me a roadmap for that or tell me the platform where to start
Yt channel and a book
Please suggest me
https://redd.it/1qxa5s1
@reddit_androiddev
SOLVED Android studio emulator not working on Linux
Since trying out Linux I haven't been able to get android studio to run the emulator and constantly got the "connecting to emulator" timeout. I've finally gotten it to work on a fresh install of Pop Os and wanted to share in case anybody else was having the same issue.
1. Find your emulator \~/.android/avd/YOUR-EMULATOR.avd/
2. locate the config.ini file
3. make sure "fastboot.forceColdBoot" is set to yes
4. make sure "fastboot.forceFastBoot" is set to no
5. optional change "hw.gpu.mode" to "host" (improved emulator performance for me)
6. save and run the emulator from android studio
https://redd.it/1qx8w1h
@reddit_androiddev
Attribution discrepancies between your MMP and internal BI: why they happen and what actually matters
Spent 6 months reconciling a 15% gap between our MMP attribution and internal warehouse data. The issue wasn't wrong data, it was different methodologies.
MMP: 7-day view, 1-day click windows with probabilistic modeling for iOS
Internal BI: 30-day everything, deterministic only
The real question isn't which is right, it's which helps you make better budget decisions. What have you learned about what methodology to use when?
https://redd.it/1qx6lqb
@reddit_androiddev
We made an unopinionated ExpandableText library
https://redd.it/1qx4kg3
@reddit_androiddev
Claude Opus 4.6 is the best for Android
https://redd.it/1qx1uw4
@reddit_androiddev
A way to access turned off device
Esentially the question in the title.
Sorry if this sub isn't for this.
I was very into android roms flashing etc. 10 years ago but when android 5 or 6 came and root / xposed stopped being really necessary I just used my phones stock.
So I have this phone that have problems with the C-Port or the battery maybe and it is really hard to charge and turn on. Also loops sometimes randomly, have to state that I've never rooted it or changed the software so I assume is a power issue.
I really want to send it to repair (or let it die in peace) but first I would like the information in the internal drive (lots of pictures, videos, app data like whatsapp where there are a lot more of pictures and videos) and I was wondering if it exists nowadays some kind of way or tool to just access it regardless of the phone being active. Obviously I know the unlock pattern and the biometry is my finger if that helps someway. My guess is that is difficult for it to be possible but maybe someone smarter here knows a way or has an idea. I don't know nor have the tools for opening it and doing electronic things, and is not an option to me send it to repair center with my data inside it (in my country I wouldn't trust giving to an unknown person a phone that has my accounts in it...)
https://redd.it/1qwsjb7
@reddit_androiddev
Google play exposing my address!.. help?
I just found out that Google Play is exposing my address on my app store app on publishing.
Solo devs, if anyone has found a workaround.. please let me know. I have tried looking for Virtual Coworking space addresses but I couldn't find any virtual address renting company to try for a couple months.. they all have yearly packages here in India, which I am not looking to buy.
Google requires me to share any documents WITH my name on it ..
Provide a photo of a proof of address document from the following list. Your name and address must be clearly visible. DOCUMENTS WE ACCEPT:
• A government-issued document or photo ID
• A utility or phone bill (with a date in the last 60 days)
• A bank statement (with a date in the last 60 days)
• A lease or mortgage agreement
What other ways can l not get doxxed and use an alternative address for my personal dev acount? Would really appreciate the help.
https://redd.it/1qwv43w
@reddit_androiddev
Confused about app development tech choices and sde roles
hey everyone,
im 22 M just moved to bengaluru (hsr sec 6), for 5-6 month flutter intern role.
i would say im kinda an intermediate in flutter and enjoy building apps in a way that i dont hate it :)
right now im also trying to upskill myself so that if in case i dont get a ft role, then can apply somewhere. the current confusion is between following my app dev journey in flutter, kotlin, iOS maybe idk..
or look for sde roles as i think they pay more to freshers compared to app dev, but require starting from scratch going in backend, full-stack etc. also dsa which i dont like but willing to practice till tress/dp.
idk im confused :)
help pls
https://redd.it/1qwhkii
@reddit_androiddev