Code Monkey home page Code Monkey logo

cursorwheellayout's People

Contributors

bcsl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cursorwheellayout's Issues

Items bg colour

How can change items background color. I want to develop it like a pie chart.

固定滑动的数量

你好,请问可以固定滑动的数量吗?比如每次滑动只允许往左滑动一个item或者只允许向右滑动一个item?

Set number of rounds

  • it will be super useful if you can configure the number of rounds before wheel stops in order to achieve lucky wheel effect
    Win-Wheel

wheel Items overlapping

It's working fine when few items added in the wheel, but when increase the items around approx 50-60 the items are overlap and looks very small in size.I made semi circular wheel for insert larger number of items.

It would be great help for me, if you give some solution for the same.

Not work in device with 4.3

Good morning, I am testing in device with 4.3 and not work .

java.lang.RuntimeException: Unable to start activity ComponentInfo{github.hellocsl.cursorwheellayout/github.hellocsl.cursorwheellayout.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout
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 #12: Error inflating class github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout
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:38)
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) 

java.lang.ArithmeticException: divide by zero

Hi,

I'm using this Library in a fragment:

`

       <github.hellocsl.cursorwheel.CursorWheelLayout

        android:id="@+id/circle_menu"
        android:layout_width="300dip"
        android:layout_height="300dip"
        android:layout_gravity="right|bottom"
        android:layout_marginBottom="-120dp"
        android:layout_marginRight="-120dip"
        app:wheelBackgroundColor="@color/pink"
        app:wheelCursorColor="@color/red"
        app:wheelCursorHeight="20dip"
        app:wheelFlingValue="460"
        app:wheelSelectedAngle="225">


        <ImageView
            android:id="@id/id_wheel_menu_center_item"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:src="@drawable/car"
            android:textColor="#009688"
            />

    </github.hellocsl.cursorwheel.CursorWheelLayout>`

but i've an exception:

java.lang.ArithmeticException: divide by zero at github.hellocsl.cursorwheel.CursorWheelLayout.onLayout(CursorWheelLayout.java:362) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1735) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1579) at android.widget.LinearLayout.onLayout(LinearLayout.java:1488) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:435) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1735) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1579) at android.widget.LinearLayout.onLayout(LinearLayout.java:1488) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1735) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1724) at android.widget.LinearLayout.onLayout(LinearLayout.java:1490) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1187) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678) at android.view.View.layout(View.java:16637) at android.view.ViewGroup.layout(ViewGroup.java:5437) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2179) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1939) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1115) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6029) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:606) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5458) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Thank you

Create in programming dynamically

How can I create circlewheel in java code and dynamically size it.

CursorWheelLayout testCircleMenu = new CursorWheelLayout(context); testCircleMenu.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)); fl.addView(testCircleMenu);

and get exception:

ava.lang.ArithmeticException: divide by zero at CursorWheelLayout.dispatchDraw(CursorWheelLayout.java:589) at android.view.View.draw(View.java:17472)

How can I set up the round (finite scrolling)?

Hi, It would be very helpful if you tell me how can I set up the finite scrolling, still it scroll infinite. I want to setup the round so that it won't do the infinite scrolling.

Your input much helpful.

添加背景图片

您好!我想知道,您的项目能不能添加一个背景图片,让这个背景图片可以和item的转动一起转动

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

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) 

JCenter Deprecation Maven Migration

JFrog has alluded to their shutting down of Jcenter and this seems to break the ability to use this library. Migration to Maven Central would be greatly appreciated.

onItemSelected is not calling on selection

I am trying to make a spinning wheal for menu for that i use this library. The problem is this the onItemSelected function doesn't call. i tried log and toasting something in it but nothing happen.
the Dashboard activity code is below:

`package tk.mahijat.login;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;

import github.hellocsl.cursorwheel.CursorWheelLayout;
import tk.mahijat.login.Adapter.WheelImageAdapter;
import tk.mahijat.login.Adapter.WheelTextAdapter;
import tk.mahijat.login.Data.ImageData;
import tk.mahijat.login.Data.MenuItemData;


public class dashboard extends AppCompatActivity implements CursorWheelLayout.OnMenuSelectedListener{
    String useremail;
    Button incomebtn;
    Button expbtn;
    Button brbtn;
    Button reportbtn;
    Button logout;

    CursorWheelLayout wheel_text,wheel_image;
    List<MenuItemData> lstText;
    List<ImageData> lstImage;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dashboard);
        Bundle extras = getIntent().getExtras();
        if(extras == null) {
            useremail= null;
        } else {
            useremail = extras.getString("useremail");
        }
//        incomebtn = (Button)findViewById(R.id.incomebtn);
//        expbtn = (Button)findViewById(R.id.expensesbtn);
//        brbtn = (Button)findViewById(R.id.borrowbtn);
//        reportbtn = (Button)findViewById(R.id.reportbtn);
//        logout = (Button)findViewById(R.id.logout);
//
//        incomebtn.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                openincome(v);
//            }
//        });
//        expbtn.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                openexpenses(v);
//            }
//        });
//        brbtn.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                openborrow(v);
//            }
//        });
//        reportbtn.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                openreport(v);
//            }
//        });
//        logout.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                logoutuser(v);
//            }
//        });
        initViews();
        loadData();
    }

    private void loadData() {
        lstText = new ArrayList<>();
        lstText.add(new MenuItemData("DashBoard"));
        lstText.add(new MenuItemData("Income"));
        lstText.add(new MenuItemData("Expenses"));
        lstText.add(new MenuItemData("Borrow"));
        lstText.add(new MenuItemData("Report"));
        lstText.add(new MenuItemData("User Profile"));
        lstText.add(new MenuItemData("Logout"));
        WheelTextAdapter adapter = new WheelTextAdapter(getBaseContext(),lstText);
        wheel_text.setAdapter(adapter);

        lstImage = new ArrayList<>();
        lstImage.add(new ImageData(R.drawable.fb,"Facebook"));
        lstImage.add(new ImageData(R.drawable.drive,"Drive"));
        lstImage.add(new ImageData(R.drawable.windows,"Microsoft"));
        lstImage.add(new ImageData(R.drawable.twitter,"Twitter"));
        lstImage.add(new ImageData(R.drawable.income,"Income"));
        WheelImageAdapter imgAdapter = new WheelImageAdapter(getBaseContext(),lstImage);
        wheel_image.setAdapter(imgAdapter);
    }

    private void initViews() {
        wheel_image = (CursorWheelLayout)findViewById(R.id.wheel_image);
        wheel_text = (CursorWheelLayout)findViewById(R.id.wheel_text);

    }

    @Override
    public void onItemSelected(CursorWheelLayout parent, View view, int pos) {
        Log.e("Enter","Enter");
        Toast.makeText(dashboard.this, "Enter in menu", Toast.LENGTH_SHORT).show();
        if(parent.getId() == R.id.wheel_text)
            Toast.makeText(dashboard.this, ""+lstText.get(pos).mTitle, Toast.LENGTH_SHORT).show();
            if(lstText.get(pos).mTitle=="DashBoard")
            {

            }else if(lstText.get(pos).mTitle=="Income")
            {
                openincome(view);
            }else if(lstText.get(pos).mTitle=="Expenses")
            {
                openexpenses(view);
            }else if(lstText.get(pos).mTitle=="Borrow")
            {
                openborrow(view);
            }else  if(lstText.get(pos).mTitle=="Report")
            {
                openreport(view);
            }else if(lstText.get(pos).mTitle=="User Profile")
            {

            }else if(lstText.get(pos).mTitle=="Logout")
            {
                logoutuser(view);
            }
        else if(parent.getId() == R.id.wheel_image)
            Toast.makeText(getBaseContext(), "Selected"+lstImage.get(pos).imageDescription, Toast.LENGTH_SHORT).show();
    }

    public void logoutuser(View v) {
        MyDBHandler dbHandler = new MyDBHandler(this, null, null, 1);
        dbHandler.logoutuser(useremail);
        Intent b = new Intent(this,Login.class);
        startActivity(b);
    }

    public void openincome(View v)
    {
        Intent a = new Intent(this,income.class);
        a.putExtra("useremail", useremail);
        startActivity(a);
    }

    public void openexpenses(View v)
    {
        Intent a = new Intent(this,expenses.class);
        a.putExtra("useremail",useremail);
        startActivity(a);
    }

    public void openborrow(View v)
    {
        Intent a = new Intent(this,borrow.class);
        a.putExtra("useremail",useremail);
        startActivity(a);
    }

    public void openreport(View v)
    {
        Intent a = new Intent(this,report.class);
        a.putExtra("useremail",useremail);
        startActivity(a);
    }

    @Override
    public void onBackPressed() {
        new AlertDialog.Builder(this)
                .setIcon(android.R.drawable.ic_dialog_alert)
                .setTitle("Closing Hisab-Kitab")
                .setMessage("Are you sure you want to exit?")
                .setPositiveButton("Yes", new DialogInterface.OnClickListener()
                {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        System.exit(0);
                    }
                })
                .setNegativeButton("No", null)
                .show();
    }
}

`

If you need something more i'll provide you.

Adding sound effect?

Hi bro its great library first of all , i am using my app and i have a question now. Can we add sound effect while spin the wheel?

wheelItemRadio in JavaCode

i want to set wheelItemRadio Attribute in the java code but i didn't find any Attribute like that. help me please

无法运行呀

03.268 19888-19888/github.hellocsl.cursorwheellayout E/ActivityThread: Failed to inflate
android.view.InflateException: Binary XML file line #12: Error inflating class github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
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:38)
at android.app.Activity.performCreate(Activity.java:5242)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2172)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2268)
at android.app.ActivityThread.access$800(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5094)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:702)
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:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
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:38) 
at android.app.Activity.performCreate(Activity.java:5242) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2172) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2268) 
at android.app.ActivityThread.access$800(ActivityThread.java:145) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5094) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:702) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.NoSuchMethodError: android.view.ViewGroup.
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:214)
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:209)
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:205)
at github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout.(SimpleTextCursorWheelLayout.java:19)
at java.lang.reflect.Constructor.constructNative(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
at android.view.LayoutInflater.createView(LayoutInflater.java:594) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
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:38) 
at android.app.Activity.performCreate(Activity.java:5242) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2172) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2268) 
at android.app.ActivityThread.access$800(ActivityThread.java:145) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5094) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:702) 
at dalvik.system.NativeStart.main(Native Method) 

Scrolling issue

inside scrollview or nestedScrollview the wheel is not scrolling

Add feature adater Item recycle for infinity items

What is the usage of overriding public View getView(View parent, int position); When you initialize all views on the start,

When i want to display large number of items using your great Lib,
Enable infinity items feature.

刚刚运行就报bug

FATAL EXCEPTION: main
Process: github.hellocsl.cursorwheellayout, PID: 20584
java.lang.RuntimeException: Unable to start activity ComponentInfo{github.hellocsl.cursorwheellayout/github.hellocsl.cursorwheellayout.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2264)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313)
at android.app.ActivityThread.access$1100(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:640)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:775)
at android.view.LayoutInflater.inflate(LayoutInflater.java:512)
at android.view.LayoutInflater.inflate(LayoutInflater.java:409)
at android.view.LayoutInflater.inflate(LayoutInflater.java:358)
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:38)
at android.app.Activity.performCreate(Activity.java:5302)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2228)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 
at android.app.ActivityThread.access$1100(ActivityThread.java:141) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5336) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687) 
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:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:614)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:775) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:512) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:409) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:358) 
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:38) 
at android.app.Activity.performCreate(Activity.java:5302) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2228) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 
at android.app.ActivityThread.access$1100(ActivityThread.java:141) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5336) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.NoSuchMethodError: android.view.ViewGroup.
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:214)
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:209)
at github.hellocsl.cursorwheel.CursorWheelLayout.(CursorWheelLayout.java:205)
at github.hellocsl.cursorwheellayout.widget.SimpleTextCursorWheelLayout.(SimpleTextCursorWheelLayout.java:19)
at java.lang.reflect.Constructor.constructNative(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
at android.view.LayoutInflater.createView(LayoutInflater.java:614) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:775) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:512) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:409) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:358) 
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:38) 
at android.app.Activity.performCreate(Activity.java:5302) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2228) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 
at android.app.ActivityThread.access$1100(ActivityThread.java:141) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5336) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687) 
at dalvik.system.NativeStart.main(Native Method) 

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.