Giter VIP home page Giter VIP logo

Comments (22)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I encountered the same issue now. THere are so many screen sizes to consider 
for android. k!

Original comment by [email protected] on 28 Dec 2010 at 12:50

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I also have the same problem on 2.1.

Original comment by [email protected] on 28 Dec 2010 at 7:41

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I have the same problem however I have noticed you can get it to scroll a small 
amount if carefully clicking in the values. It looks like the focus is getting 
lost.

Original comment by [email protected] on 29 Dec 2010 at 1:00

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
It also happens when the wheel is inside a group of linearlayouts.
Motorola Milestone running Cyanogenmod 6 (Froyo)
Unfortunately makes the view unusable. Waiting for a fix

Thanks for this great widget

Original comment by [email protected] on 18 Jan 2011 at 1:18

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
gsimoes,

Could you please provide example with a group of linear layouts?

Thanks

Original comment by [email protected] on 18 Jan 2011 at 2:48

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I've fix this issue (I hope).
Please look at 
http://android-devblog.blogspot.com/2011/01/scrolling-inside-scrollview.html
I'm not able to commit the fix now because of working on another issue, will do 
that later. So, please update your sources manually as described in link above 
and let me know whether it works.

Thanks,
Yuriy

Original comment by [email protected] on 18 Jan 2011 at 8:58

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
Unfortunately it didn´t solve my problem.

Layout:


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_height="wrap_content" android:layout_width="fill_parent">
<TextView android:layout_height="wrap_content" android:textColor="#FFFFFF" 
android:layout_centerHorizontal="true" android:layout_marginTop="5dip" 
android:id="@+id/tvTitle" android:textSize="16sp" android:text="Start Marker" 
android:layout_width="fill_parent" 
android:gravity="center_horizontal"></TextView>

<LinearLayout android:layout_height="wrap_content" 
android:layout_centerHorizontal="true" android:layout_width="wrap_content" 
android:layout_below="@+id/tvTitle" android:layout_marginTop="10dip" 
android:id="@+id/llWheels">
    <LinearLayout android:layout_toLeftOf="@+id/wvHH" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/llHH" android:orientation="vertical">
        <kankan.wheel.widget.WheelView android:id="@+id/wvHH" android:layout_height="wrap_content" android:layout_width="100dip" android:layout_weight="1"/>
        <TextView android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textSize="12sp" android:layout_marginTop="3dip" android:text="Hour" android:layout_width="fill_parent" android:gravity="center_horizontal" android:id="@+id/tvHH"></TextView>
    </LinearLayout>
    <LinearLayout android:layout_toLeftOf="@+id/wvMM" android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="vertical" android:id="@+id/llMM" android:layout_marginLeft="10dip">
        <kankan.wheel.widget.WheelView android:id="@+id/wvMM" android:layout_height="wrap_content" android:layout_width="50dip"/>
        <TextView android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textSize="12sp" android:layout_marginTop="3dip" android:layout_width="fill_parent" android:gravity="center_horizontal" android:id="@+id/tvMM" android:text="Minutes"></TextView>
    </LinearLayout>
    <LinearLayout android:layout_toLeftOf="@+id/wvSS" android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="vertical" android:id="@+id/llSS" android:layout_marginLeft="10dip">
        <kankan.wheel.widget.WheelView android:id="@+id/wvSS" android:layout_height="wrap_content" android:layout_width="50dip"/>
        <TextView android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textSize="12sp" android:layout_marginTop="3dip" android:layout_width="fill_parent" android:gravity="center_horizontal" android:id="@+id/tvSS" android:text="Seconds"></TextView>
    </LinearLayout>
    <LinearLayout android:layout_toLeftOf="@+id/wvMS" android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="vertical" android:id="@+id/llMS" android:layout_marginLeft="10dip">
        <kankan.wheel.widget.WheelView android:id="@+id/wvMS" android:layout_height="wrap_content" android:layout_width="65dip"/>
        <TextView android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textSize="12sp" android:layout_marginTop="3dip" android:layout_width="fill_parent" android:gravity="center_horizontal" android:id="@+id/tvMS" android:text="Milli Seconds"></TextView>
    </LinearLayout>
</LinearLayout>


</RelativeLayout>

I´m using the wheel code as a library project and I´m loading this layout 
inflating it in a new view and loading it inside a quick action.
I´m filling it´s values using a NumericWheelAdapter.
The behavior for me is: if I touch exactely on the gray frame it moves the 
wheel just a bit. As my finger gets away from the center it stops. If I double 
touch the center the number center again but I can´t scroll the wheel at all. 
It´s just a prety small move.

Original comment by [email protected] on 19 Jan 2011 at 1:47

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
Solved the problem for me!
(having a WheelView inside a ScrollView)


Thank you so much!

Original comment by [email protected] on 19 Jan 2011 at 1:42

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
Any ideas?

Original comment by [email protected] on 21 Jan 2011 at 2:27

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I'm working on it, will comment soon

Original comment by [email protected] on 21 Jan 2011 at 9:02

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
gsimoes,

Could you please provide sources (as less as possible) that reproduce your 
issue? I mean an activity code that works with this provided layout.

Provided layout works fine for me.

Original comment by [email protected] on 23 Jan 2011 at 7:11

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
All I did was to add a NumericWheelAdapter to one of the wheels.
When I try to scrool it it seems to lose the touch just after my finger leaves 
the center of the wheel.
As I told you this layout is inflated to a view which is exhibited as a quick 
action. that´s just it. :(

Original comment by [email protected] on 24 Jan 2011 at 4:19

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
In this case it depends on your implementation of a quick action.
So, without code that reproduces this issue I'm unable to help you.

All that the wheel needs for scrolling is the touching event that depends on 
the parent behavior.

Original comment by [email protected] on 25 Jan 2011 at 1:38

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I will check it out again and see if I can find a way out. I´ve tried many 
native widgets and since they all work, I may find a fix for the problem.

Thanks,
Gabriel Simões

Original comment by [email protected] on 25 Jan 2011 at 10:36

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
Fixed in the latest version! thank you very much.

Original comment by [email protected] on 30 Jan 2011 at 6:41

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
Great :)

Original comment by [email protected] on 31 Jan 2011 at 7:43

  • Changed state: Fixed

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I'm experiencing this issue again, on Android 4.0 devices. The wheels refuse to 
move if in a ScrollView. Works fine on pre-4.0 devices. Anyone else having this 
problem?

Original comment by [email protected] on 15 Mar 2012 at 11:20

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
Im having the same problem, wheel stopped workng when my phone upgraded to 4.0

Original comment by [email protected] on 7 Jun 2012 at 11:14

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
i have the same problem too: android 4.0

Original comment by [email protected] on 21 Jul 2012 at 3:37

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
This is not fixed. I have the latest version of the Wheel but running on a real 
device (Samsung Galaxy SII) with Android 4.0.4 the Wheel scrolls inside a 
ScrollView but it is VERY unresponsive. I need to make sure to click precisely 
in the center of the wheel hold my position for a moment and slowly scroll. 
With the same wheel outside of the ScrollView it functions flawlessly.

My layout:

--------------main layout
LinearLayout
 ScrollView
  LinearLayout
-----------------compound control layout
   LinearLayout
    WheelView
    WheelView
    WheelView

Not sure if it matters but the direct parent of the wheel is not the ScrollView 
so the call to getParent().requestDisallowInterceptTouchEvent(true) might not 
be working properly. The WheelView is inside a compound control and I believe 
the parent LinearLayout is being merged into the next parent so the end result 
overall is only 2 LinearLayouts not 3 (I could be mistaken about that). 

I tried to put a while loop in its place that recursively went through all 
parent checking for ScrollViews and making the appropriate call as needed but 
this didn't work either.

Original comment by [email protected] on 4 Feb 2013 at 6:28

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
[deleted comment]

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 14, 2024
I found a solution to this. In WheelView.java on line 611 change the switch 
statement to the following:

switch (event.getAction()) {
    case MotionEvent.ACTION_DOWN: //added to fix problem
    case MotionEvent.ACTION_MOVE:
        if (getParent() != null) {
            getParent().requestDisallowInterceptTouchEvent(true);
    }
    break;

    case MotionEvent.ACTION_UP:
        if (getParent() != null) { //added to fix problem, this may be uneeded
            getParent().requestDisallowInterceptTouchEvent(false);
        }

    if (!isScrollingPerformed) {
        int distance = (int) event.getY() - getHeight() / 2;
        if (distance > 0) {
            distance += getItemHeight() / 2;
        } else {
                distance -= getItemHeight() / 2;
        }
        int items = distance / getItemHeight();
        if (items != 0 && isValidItemIndex(currentItem + items)) {
                notifyClickListenersAboutClick(currentItem + items);
            }
    }
    break;
}

Original comment by [email protected] on 4 Feb 2013 at 6:54

from android-wheel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.