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?

有帮助吗?

解决方案

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);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top