
pjamesrud
Android app, using a loop value to set visibilty and add data to textview?
I am creating an app that allows user to enter values and depending on the value a number of textviews are changed programmatically from gone to visible.
In the xml file there is TV!,TV2 and TV3, The user enters a couple of numbers from previous activity and these are used to set the visibility of the TV1,TV2 and TV3 textviews
Example:
User enters 2.
Using a for loop
for (int i = 0; i<= userinput; i++){
showTV = "TV"+(i);
showTV.setVisibility(View.VISIBLE);
showTV.setText(String.valueOf(list1.get(1)));
But I can not get the textview’s Id to be recognized using the i value
Can it be done this way or is this the wrong direction.
Popular Frontend topics

You work in a loop: write code, get feedback, iterate. The faster you get feedback, the faster you can learn and become a more effective ...
New

Inspired by @dbernheisel’s post here, which CSS framework do you use and why?
New

Vue.js v2.6.11 has been released.
Link: Release v2.6.11 · vuejs/vue · GitHub
New

Wondering if anyone has any thoughts on choosing between these two languages for WebAssembly?
I definitely want to explore wasm, and rea...
New

WebAssembly-Powered FM Synthesizer.
An 8-operator, polyphonic FM synthesizer running completely in the web browser via Rust compiled to ...
New

Fable 3.2.3 has been released.
Link: Release 3.2.3 · fable-compiler/Fable · GitHub
New

So I’ve got a client that wants to build a site like this:
Specifically 3 things from the website:
The fullscreen sections that chang...
New

Welcome to @actionforms_io :rocket:
No code - No backend Form sender for developers
Send your without a backend
Join now: https://www...
New

Hello everyone, is there a website or app that I can use to improve my self
Like where there are UI UX designs to practice with and then...
New

Announcing Parcel CSS: A new CSS parser, compiler, and minifier written in Rust!.
I’m very excited to announce @parcel/css, a new CSS pa...
New
Other popular topics

My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New

There’s a whole world of custom keycaps out there that I didn’t know existed!
Check out all of our Keycaps threads here:
https://forum....
New

Small essay with thoughts on macOS vs. Linux:
I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New

Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New

Think Again 50% Off Sale »
The theme of this sale is new perspectives on familiar topics.
Enter coupon code ThinkAgain2021 at checkout t...
New

Woooooooo! This is such a huge release for it, and 2 years incoming!
In short, the library is now using an updated hyper backend (not j...
New

Hi folks,
I don’t know if I saw this here but, here’s a new programming language, called Roc
Reminds me a bit of Elm and thus Haskell. ...
New

Author Spotlight:
David Bryant Copeland
@davetron5000
We’re so happy to bring you another Author Spotlight, a series where we sit dow...
New

A Brief Review of the Minisforum V3 AMD Tablet.
Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New

This is a very quick guide, you just need to:
Download LM Studio: https://lmstudio.ai/
Click on search
Type DeepSeek, then select the o...
New
Latest in Frontend
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /zig
- /scala
- /html
- /debian
- /nixos
- /lisp
- /agda
- /textmate
- /sublime-text
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /julia
- /slackware
- /c
- /neovim