android - Drag Listview Item on Top -


how drag array item when code execute?

<listview         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_alignparentleft="true"         android:id="@+id/listview"         android:layout_alignparentstart="true"         android:layout_alignparenttop="true" /> 

­­­­­­­­­­­­­­­­­­­­­

for drag listview item on top means 0th position:

getlistview().setselection(0); 

for smooth scroll:

getlistview().smoothscrolltoposition(0); 

use property. hope help...


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -