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

Apps Gallery with moving text?

RED_

Well-Known Member
Hey,

Bit stumped on this, recently started getting into Android Development so still a bit of a newbie.

I'm trying to create an app that will have a full-screen slideshow that will allow me to change images when i swipe left to right. Basically a full screen gallery.

That I can do on my own, however is there a way to get linkable text at the bottom of each image that will be individual to each image? So when i swipe left or right the text will also change with the image?

I'm thinking a frame layout so the links can be overalyed onto the image but i have now idea how to get the links to actually move as well, is it even possible? Maybe there's a different way of doing it?

I'd really appreciate any feedback i can get as i have no idea how to do this now. Thanks in advance.

Edit: I guess a cheat way around it is to photoshop the image first and add the text before hand but i'll see about doing it the right way first.
 
Ok i've been given this peice of code that will change the size of the gallery:

Code:
Gallery mGallery = new Gallery(); 
LayoutParams params = new LayoutParams(); 
params.height = 150; 
params.width = 150; 
mGallery.setLayoutParams(params);

However still being a newbie, i have no idea where i can put the code in the class. Anyone know?
 
Ok i've been given this peice of code that will change the size of the gallery:

Code:
Gallery mGallery = new Gallery(); 
LayoutParams params = new LayoutParams(); 
params.height = 150; 
params.width = 150; 
mGallery.setLayoutParams(params);

However still being a newbie, i have no idea where i can put the code in the class. Anyone know?

Wherever you instantiate the Gallery... Probably the onCreate() method?
 
Don't know if its always like this but found the LayoutParams in my code already so all i had to do was edit the numbers to make the gallery bigger. Simpler than i thought.

Thanks for you help.
 
Back
Top Bottom