문제가 있습니다. 이 라이브러리를 사용하여 패널을 위로 밀어 넣었습니다. here을 클릭하십시오. 나는 그것을 추가 한 다음 Google지도 응용 프로그램처럼 플로팅 액션 단추를 만들려고했습니다. (그림과 같이). 플로팅 동작 버튼을 올바르게 설정하는 방법은 무엇입니까?
하지만 아래는 내 결과입니다. 설정 방법 (슬라이딩 패널의 상단을 trasprent로 만들 수 있음)은 1 차 그림과 동일하게 올바르게 설정합니다.
fragment_1.xml (레이아웃 부분을 슬라이딩 확인) 어떤 도움
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.sothree.slidinguppanel.SlidingUpPanelLayout
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoPanelHeight="56dp"
sothree:umanoShadowHeight="4dp"
sothree:umanoParalaxOffset="50dp"
sothree:umanoDragView="@+id/dragView"
xmlns:fab="http://schemas.android.com/apk/res-auto">
<!-- MAIN CONTENT -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="100">
</LinearLayout>
<!-- SLIDING LAYOUT -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="390dp"
android:background="@android:color/transparent"
android:orientation="vertical"
android:clickable="true"
android:focusable="false"
sothree:umanoOverlay="true"
android:layout_below="@+id/main_content">
<!-—TOP OF PANEL -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:orientation="horizontal"
android:background="#03A9F4"
android:id="@+id/dragView">
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="14sp"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:textColor="@android:color/white"/>
<Button
android:id="@+id/follow"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="14sp"
android:gravity="center_vertical|right"
android:paddingRight="10dp"
android:paddingLeft="10dp"/>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/fab"
sothree:fab_type="normal"
android:layout_marginBottom="25dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right|center"
android:tint="@android:color/white"
android:src="@android:drawable/ic_dialog_map"
fab:fab_colorNormal="@color/fab_primary"
fab:fab_colorPressed="@color/fab_pressed"
fab:fab_colorRipple="@color/fab_ripple"/>
</LinearLayout>
</LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</RelativeLayout>
감사합니다!
안녕하세요 @ 알리-NRD 그것은 내가 필요가 무엇인지. 플로팅 액션 버튼은 Google지도 앱처럼 패널에 바인딩되어야합니다. 아이디어가 있습니까? –
@NurzhanNogerbek 정확히, 그건 내 질문이다. 나는 똑같은 문제에 처해있다. 일단 내가 그 일을 게시 할 것입니다. 하지만 아직 어떤 대답을 찾았습니까 ?? – sud007
안녕하세요! 네,이 문제를 해결했습니다. 라이브러리 내부를 크게 변경해야합니다. 확인 : https://github.com/umano/AndroidSlidingUpPanel/pull/362/files –