简体   繁体   English

需要在图库的底部显示链接。

[英]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.

相关问题 设置CENTER.CROP图像在图库中的自定义位置。 剪切图像的底部而不是顶部 - Setting custom position of CENTER.CROP images in gallery. Cutting bottom part of image instead of top one Android,Java,从图库中选择图像。 商店链接并稍后打开 - Android, Java, Choose image from gallery. Store link and open later 尝试将imageView图像保存到图库,但无法保存到图库。(Android) - Trying to save imageView image to gallery, but cannot saved to gallery.(Android) 如何旋转从相机或画廊拍摄的图像? - How rotate image taken from camera or gallery.? 从Gallery中检索非缓存的Picasa图像。 3.0和4.0 - Retrieve a non cached Picasa image from Gallery. 3.0 and 4.0 在 android 中单击图库中的特定图像时,在图库视图底部显示放大图像 - to display magnify image in bottom of gallery view when that particular image in gallery is clicked in android 如何从图库中选择的图像中获取图像 URI。 安卓 5.0.2? - How to Get Image URI from Image selected From gallery. Android 5.0.2? 尝试从图库中获取图像时,应用崩溃。 请查看详细信息 - App crashing when trying to fetch image from gallery. Please see details 我只想将裁剪的图像保存到图库中。 但会保存原始的完整图像。 如何仅保存裁切后的图像? - I want to save only the cropped image into the gallery. but it saves the original full image. how to save only the cropped image? 使用ImageView显示图库 - Display image gallery with ImageView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM