Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to integrate this plugin with HashMap<String, String> kind of data? #17

Closed
azizimusa opened this issue Apr 12, 2015 · 4 comments
Closed

Comments

@azizimusa
Copy link

I had try couple of hours till now. Still cant integrate with HashMap<String, String>. Can you show me an example ?

@emileb
Copy link
Owner

emileb commented Apr 15, 2015

Hi the library does not concern itself with how the data is stored or represented, have you got it working in a Recyclerview without sorting?

@azizimusa
Copy link
Author

Yes it is working. But now I manage understand a bit of how to fill the data in recyclerview. Now I got new problem which is, my imageview won't allow me to drag and sort. I have pick the imageview from linearlayout. But still the problem arise. Please check my layout file. I am using imageview with an ID of #holder, at the bottom of the layout.

<!--  ListRow Left side Thumbnail image -->
<LinearLayout android:id="@+id/thumbnail"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="3dip"
    android:layout_alignParentLeft="true"
    android:layout_marginRight="5dip">

    <ImageView
        android:id="@+id/list_image"
        android:layout_width="80dip"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:src="@drawable/aed"
        android:scaleType="fitXY"
        android:layout_marginRight="20dp" />

</LinearLayout>

<!-- Currency-->
<TextView
    android:id="@+id/title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/thumbnail"
    android:layout_toRightOf="@+id/thumbnail"
    android:text="AED"
    android:textColor="#040404"
    android:typeface="sans"
    android:textSize="20sp"
    android:textStyle="bold"
    android:paddingTop="5dp" />

<!-- rates -->
<TextView
    android:id="@+id/rate"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#343434"
    android:textSize="18sp"
    android:layout_toRightOf="@+id/title"
    android:text="2.2332"
    android:paddingTop="5dp"
    android:paddingLeft="33dp" />

<!-- 1 MYR conversion -->
<TextView
    android:id="@+id/conversion"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/title"
    android:textColor="#343434"
    android:textSize="18sp"
    android:layout_marginTop="1dip"
    android:layout_toRightOf="@+id/thumbnail"
    android:text="1 MYR = 0.21312"
    android:paddingTop="5dp" />

<!-- Rightend Duration -->

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentRight="false"
    android:gravity="end">

    <!-- Rightend Arrow -->
    <ImageView

        android:id="@+id/holder"
        android:layout_width="40dip"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_star"
        android:adjustViewBounds="true"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_gravity="right" />

</LinearLayout>

@azizimusa
Copy link
Author

Hi Emileb ! ..just to inform you that i manage to get this working smoothly !.

my problem was. I didnt set the id of the imageview in

dragSortRecycler.setViewHandleId

after that, all is working .

Thanks for the plugin.

@emileb
Copy link
Owner

emileb commented May 20, 2015

Great, thanks for the update!

@emileb emileb closed this as completed May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants