[英]Android - right side screen button
我想問你是否可以在另一個視圖上方“放置”按鈕。 我想要實現的是一個帶有ListView和一個圓形Button的活動,它是從屏幕右側“出現”的。 但是,如果有人向下滾動,則按鈕必須保持在其位置,一旦按下該按鈕,就會調用新的片段。 實際上,我一開始就被困住了,不知道該怎么做,因此歡迎您提出任何建議/提示/建議。
PS:應使用按鈕將新項目添加到ListView
另外,我還創建了一個草圖以進行更好的解釋。
感謝和問候
我為您嘗試過,效果很好。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF" >
<ListView
android:id="@+id/listAlertItems"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:dividerHeight="1px"
android:listSelector="@android:color/transparent" />
<ImageView
android:id="@+id/clickBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:src="@drawable/ic_img" />
結果是:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.