Tuesday, April 29, 2014

android dropdown ListView effects, how to stop, come see it!


Common effects android drop-down list, as shown:

Press and hold your finger on the top view, drag-down effect, this effect is seemingly on a different machine manufacturers effect is not the same, some can pull, some pull them,
Would like to ask this is not the time to write custom manufacturers in death? If I want to disable this drop-down effect, there are ways to do? ? ? scrollview can do?
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Written some mobile phone manufacturers, such as Meizu.
Reply:
cited a floor pby_bob reply:
written some mobile phone manufacturers, such as Meizu.


I have this really Meizu phone. . This program such as Samsung i9100, then pull them on other machines, if unified let this drop-down rebound effect canceled, there are ways to do?
Reply:
Should be no way
Reply:
If your program is for version 2.3 and above, you can call directly setOverScrollMode method AbsListView to solve this problem.
If you also compatible with 2.1, 2.2, it can be operated by reflex.
There are three parameter values:
public static final int OVER_SCROLL_ALWAYS = 0;
public static final int OVER_SCROLL_IF_CONTENT_SCROLLS = 1;
public static final int OVER_SCROLL_NEVER = 2;

Set OVER_SCROLL_NEVER can.

Of course, if manufacturers ROM ignore this attribute, it is really no other way ~
Reply:

Add code:

 setOverScrollMode (View.OVER_SCROLL_NEVER) 

See effect?
Please refer to:
http://developer.android.com/reference/android/ widget / AbsListView.html # setOverScrollMode (int)

http://developer.android.com/reference/android/view/View . html # OVER_SCROLL_NEVER





Reply:
references, 4th Floor Rysle reply:
If your program is for version 2.3 and above, you can call directly setOverScrollMode method AbsListView to solve this problem.
If you also compatible with 2.1, 2.2, it can be operated by reflex.
There are three parameter values:
public static final int OVER_SCROLL_ALWAYS = 0;
public static final int OVER_SCRO ......


Thank you for your answer, but also would like to ask, how to remove version 2.2, then the pull-down effect? ​​Say this is your reflex actions, how to get ah?
Reply:
2.2 Most ROM is no effect of this drop, now I have seen only on a Sony machine.
Reflection is the Java reflection mechanism, by class of getMethod approach to operations, such as:
 Method method = AbsListView.class.getMethod ("setOverScrollMode", int.class); 

Then call the method's invoke it.

Reflecting the relevant knowledge can be found here: http://tianna55555.iteye.com/blog/1662972
Reply:
reference to the 7th floor Rysle reply:
2.2 majority ROM is no effect of this drop, now I have seen only on a Sony machine.
Reflection is the Java reflection mechanism, by class of getMethod approach to operations, such as:
? Java code 1Method method = AbsListView.class.getMethod ("setOverScrollMode", int.class);
Then call the invoke method can ......

Thanks again for your answer! I have here a Samsung 2.2 phone system have this effect! 2.2 AbsListView there is also this method! But seemingly can not use! That 2.2 by the reflection method to setOverScrollMode, and 2.3 can be set directly right!
Reply:
I used an online listview drop-down control, find the drop-down for a long time does not relent, then release, the screen does not move. Then click the screen just fine.

No comments:

Post a Comment