首页 > 解决方案 > 在活动上拖放片段

问题描述

我有很多像recyclerview这样的线性布局的片段。我的意思是我在活动中有片段,片段有线性布局(垂直)布局。线性布局有片段。我想改变片段的位置,比如在recyclerview中拖放。如何做到这一点吗?你能帮帮我吗?

<ScrollView
   android:id="@+id/scrollView_container"
   android:background="@color/white"
   android:paddingTop="@dimen/window_small_padding"
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   tools:context=".fragments.MainFragment">

  <LinearLayout
  android:id="@+id/linear_layout_widget_container"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_marginBottom="6dp"
  android:orientation="vertical">

</LinearLayout>


  </ScrollView>

标签: androiddrag-and-dropfragment

解决方案


推荐阅读