[英]Need to display a link at bottom of image gallery.
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
我使用了以下建议: Android Gallery全屏
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.
但我希望将屏幕垂直划分为4:1比例,并仅在上面的分区中显示图像。 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. 您可能需要使用LinearLayout创建一个xml,如teoREtik所说。 To access it's elements in that xml, you will need the following:
要访问该xml中的元素,您需要以下内容:
LayoutInflater inflater = getLayoutInflater();
galleryLayout = inflater.inflate(R.layout.xml_name, parent, false);
Gallery gallery = (Gallery) galleryLayout.findViewById(R.id.gallery);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.