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

Displaying images conditionally

I am a new guy in this Android world.

In a new app, I read 3 fields from a bunch of rows from a Sqlite DB.

One of this fields is called “path” and I need it in the SecondActivity.

The name of the table is “sections”.



Select * from sections order by name;



This gives me a ListView in the MainActivity, from it I can select one row.

What I need is the following:



1.- To send the selected “path” to the SecondActivity.

2.- This field “path” can have only three possible values, 1,2 or 3.

Now based on this value,



if path = 1 =====> I must display image1.png

if path = 2 =====> I must display image2.png

if path = 3 =====> I must display image3.png



Any ideas or some examples to help me???

Thank you in advance.



Sincerely,

Rafael

Note 5 vs new budget phone for a kid?

You can get a lot for around $200 - 300 these days in terms of decent specs. Does she need / miss the S-Pen. A pre - owned Note 10 Lite which only came out in January may be within reach, or a Moto G Stylus - I forget it's name in the US.

Without a pen, Nokia, Motorola, Samsung A21S as above, and Chinese phones are now very good indeed with excellent software.

UC Mini Apk Speed Mode not working.

Hello all,
Please help me troubleshoot this issue. I am using a old version of the UC Mini Apk version 10.9.8. The speed mode which enabled heavy data saving through compressing the web pages has stopped working and loads the default non compressed version of web pages. How do I resolve this issue? Previously when such a problem occurred, I used to turn of the cellular data option and get a error page in the compressed speed mode and then used to reload the page then which used to fix this problem but it no longer works. Any suggestions would be highly appreciated.

Help Games not working with USB controller (OTG)

I just recently got a new Galaxy a71 and have wanted to play some games on it, but the controller just isn't working.

The games I have tried it with are: Don't Starve pocket edition, Stardew Valley, and Dead by Daylight mobile. (None of these would do anything with the controller)

However, I did try the controller with a program called Parsec connected to my computer, and it worked perfectly.

Help is much appreciated!

Filter

Back
Top Bottom