将SeekBar放在Android的Imageview上?

将SeekBar放在Android的Imageview上?,第1张

概述问候,我在Android中有以下布局.我正在努力使搜索栏显示在图像的顶部(我有一些代码使其可见和不可见(或者更确切地说是GONE).我想知道是否有人能告诉我如何定位它以使搜索栏越过图像视图,因此允许图像视图占据整个屏幕.谢谢<FrameLayoutxmlns:android="http://schemas.android

问候,

我在Android中有以下布局.我正在努力使搜索栏显示在图像的顶部(我有一些代码使其可见和不可见(或者更确切地说是GONE).

我想知道是否有人能告诉我如何定位它以使搜索栏越过图像视图,因此允许图像视图占据整个屏幕.

谢谢

<FrameLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"androID:layout_wIDth="fill_parent"androID:layout_height="fill_parent"><.imageOverlay androID:ID="@+ID/surface"androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content"androID:layout_gravity="center" /><relativeLayout androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent"><linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:orIEntation="vertical" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent"><Seekbar androID:ID="@+ID/seekbar" androID:layout_wIDth="100px" androID:layout_height="wrap_content" androID:layout_gravity="center_horizontal" androID:max="255"/><ImageVIEw androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:ID="@+ID/surfaceimage" androID:scaleType="fitXY"  />

解决方法:

得到了以下内容 – 我添加了framelayout而不是linearlayout.

<?xml version="1.0" enCoding="utf-8"?><FrameLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"androID:layout_wIDth="fill_parent"androID:layout_height="fill_parent"><.imageOverlay androID:ID="@+ID/surface"androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content"androID:layout_gravity="center" /><relativeLayoutandroID:layout_wIDth="fill_parent"androID:layout_height="fill_parent"><FrameLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"     androID:orIEntation="vertical"androID:layout_wIDth="fill_parent"androID:layout_height="fill_parent"><ImageVIEwandroID:layout_wIDth="fill_parent"androID:layout_height="fill_parent" androID:ID="@+ID/surfaceimage" androID:scaleType="fitXY"  />  <SeekbarandroID:ID="@+ID/seekbar"androID:layout_wIDth="100px"androID:layout_height="wrap_content"androID:layout_gravity="center_horizontal"androID:max="255"/></FrameLayout></relativeLayout>
总结

以上是内存溢出为你收集整理的将SeekBar放在Android的Imageview上?全部内容,希望文章能够帮你解决将SeekBar放在Android的Imageview上?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1118605.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存