Slide item to increment Textview

Asked

Viewed 335 times

5

Is there any component that when sliding an item of a ListView, it increases a TextView in the item itself?

As in the image below:

Sliding to the right, increments according to the value that appears the TextView left. The reverse happens when we slide to the right.

Imagem exemplo

1 answer

0

I do not know if this type of question is valid here in the OS, since it is about component "research", and no doubt programming rs. But anyway, follows response taken from the OS in English:

This component does what you need.

Example declaration in the component’s own documentation:

<com.fortysevendeg.swipelistview.SwipeListView 
        xmlns:swipe="http://schemas.android.com/apk/res-auto"
        android:id="@+id/example_lv_list"
        android:listSelector="#00000000"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        swipe:swipeFrontView="@+id/front"
        swipe:swipeBackView="@+id/back"
        swipe:swipeActionLeft="[reveal | dismiss]"
        swipe:swipeActionRight="[reveal | dismiss]"
        swipe:swipeMode="[none | both | right | left]"
        swipe:swipeCloseAllItemsWhenMoveList="[true | false]"
        swipe:swipeOpenOnLongPress="[true | false]"
        swipe:swipeAnimationTime="[miliseconds]"
        swipe:swipeOffsetLeft="[dimension]"
        swipe:swipeOffsetRight="[dimension]"
/>

whereas:

  • swipeFrontView - defendant - front view
  • swipeBackView - defendant - background view

Original reply in the OS in English

  • I’ve tested this component and I’ve tried to implement my needs, but it didn’t fit. In fact what I need is as I drag the item and as the number appears the textview of the item receives the value. In case I do not click on any button, just the sliding of the item sets the value. Maybe you have some idea how to implement in this example you sent

  • You want for example, a wheel spinner in backView ? ai as the selected value, it sends to frontView ? If not, edit your question by placing images to make it clearer. Even if I don’t know how, someone else might show up who knows how :)

  • But there is an image of the component with the item being dragged...

  • For me at least it is not clear, there is no way you explain better what you need ? and by chance, the backView item you’re trying to say, would be a kind of Whell Spiner ?

  • No, nothing to be. I will explain the image: It has a listview, where each item has a game. Note that one of the items was slid to the direct (Spain game) and below the item appear the numbers 0, 1, 2. In the case if the user slides the item enough to only show item 0 then the Textview corresponding to Spain will receive the value 0. If you slide to the value 2, then the corresponding Textbox from Spain will receive the value 2. That’s what I need. The image I extracted from the Tips app you have in the play store if you have an interface to know the listview I need.

  • Now I get it. I don’t know any components that do that, and from what I read in the sources on this one, it doesn’t seem to either. But I was curious to know what would be the behavior of the component in the case of a guess of 7x1 (type Germany x Brazil, Orinthians x Saints) rs.

  • In case if you drag the list to the end appears a popup for you to enter the value.

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.