Question

I am using gallery view to display images in a gallery view in full screen. I have used the suggestion given below: Android Gallery fullscreen

The gallery view is fine. But I want to divide the screen in 4:1 ratio vertically and display the image in the above partition only. In the lower partition, I want to display a text with link. Now the link should open the target in default browser.

How can i divide the screen? And is it better to have text or button for the link?

Was it helpful?

Solution

You might need to create an xml with LinearLayout like teoREtik said. To access it's elements in that xml, you will need the following:

LayoutInflater inflater = getLayoutInflater();
galleryLayout = inflater.inflate(R.layout.xml_name, parent, false);
Gallery gallery = (Gallery) galleryLayout.findViewById(R.id.gallery);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top