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

Use github.hellocsl.cursorwheel.CursorWheelLayout instead of github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout in my xml file and not work in my device 4.3 #4

Closed
juamor86 opened this issue May 17, 2016 · 6 comments

Comments

@juamor86
Copy link

I have changed to CursorWheelLayout , this my xml -->

<github.hellocsl.cursorwheel.CursorWheelLayout
android:id="@+id/test_circle_menu_top"
android:layout_width="280dip"
android:layout_height="280dip"
android:layout_gravity="center_horizontal|top"
app:wheelCursorColor="#009688"
app:wheelCursorHeight="19dip"
app:wheelSelectedAngle="270">

<TextView
    android:id="@id/id_wheel_menu_center_item"
    style="@style/TextAppearance.AppCompat.Large.Inverse"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:text="Wheel"
    android:textColor="#009688"
    />

</github.hellocsl.cursorwheel.CursorWheelLayout>

It appears the same error

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{github.hellocsl.cursorwheellayout/github.hellocsl.cursorwheellayout.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class github.hellocsl.cursorwheel.CursorWheelLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
at android.app.ActivityThread.access$700(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class github.hellocsl.cursorwheel.CursorWheelLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:626)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at github.hellocsl.cursorwheellayout.MainActivity.onCreate(MainActivity.java:29)
at android.app.Activity.performCreate(Activity.java:5372)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349) 
at android.app.ActivityThread.access$700(ActivityThread.java:159) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:176) 
at android.app.ActivityThread.main(ActivityThread.java:5419) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:525) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:600)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:498) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:398) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:354) 
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
at github.hellocsl.cursorwheellayout.MainActivity.onCreate(MainActivity.java:29) 
at android.app.Activity.performCreate(Activity.java:5372) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349) 
at android.app.ActivityThread.access$700(ActivityThread.java:159) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:176) 
at android.app.ActivityThread.main(ActivityThread.java:5419) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:525) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.NoSuchMethodError: android.view.ViewGroup.
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:0)
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:0)
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:0)
at java.lang.reflect.Constructor.constructNative(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 
at android.view.LayoutInflater.createView(LayoutInflater.java:600) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:498) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:398) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:354) 
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
at github.hellocsl.cursorwheellayout.MainActivity.onCreate(MainActivity.java:29) 
at android.app.Activity.performCreate(Activity.java:5372) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349) 
at android.app.ActivityThread.access$700(ActivityThread.java:159) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:176) 
at android.app.ActivityThread.main(ActivityThread.java:5419) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:525) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 
at dalvik.system.NativeStart.main(Native Method) 

@BCsl
Copy link
Owner

BCsl commented May 17, 2016

Maybe you should try to install and run the demo.apk to check if it work fine on your phone.

@juamor86
Copy link
Author

I have installed the apk in my device and the application breaks and crashes

@BCsl
Copy link
Owner

BCsl commented May 17, 2016

I have upload a new demo apk and try to fix this bug ,can you install and run this demo apk to see if it work well since i have no devices below 5.0 on my hand now.what i did was just move the CursorWheelLayout 's init step to appropriate Constructor.

@juamor86
Copy link
Author

I am testing in device with android 4.2.2 and 4.3 and not work , any ideas?

@BCsl
Copy link
Owner

BCsl commented May 18, 2016

@juamor86 I have tested in device with 4.1 and 4.4 and work well.Did you install the correct apk that it 's name is "wheel-v1.01.apk"?

@juamor86
Copy link
Author

yes I have tested the new version and all right! Thanks you!!

@BCsl BCsl closed this as completed May 19, 2016
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