GithubHelp home page GithubHelp logo

pickerview-android's Introduction

PickerView for Android

Another custom PickerView for android,which is easy to use and customize.

Usage

<com.lantouzi.library.pickerview.PickerView android:id="@+id/picker1"
							android:layout_width="wrap_content"
							android:layout_height="wrap_content"
							android:layout_alignBottom="@id/picker2"
							android:layout_toRightOf="@id/picker0"
							android:background="@android:color/holo_orange_light"
							app:pvDisplaySize="3"
							app:pvDividerColor="@android:color/holo_green_dark"
							app:pvTextColor="@android:color/holo_blue_bright"
							app:pvTextPaddingH="20dp"
							app:pvTextPaddingV="10dp"
							app:pvTextSize="35sp"/>

Event Callback

mPickerView2.setOnPickChangeListener(new PickerView.OnPickerListener() {
		@Override
		public void onPicking(int index) {

		}

		@Override
		public void onPicked(int index) {
			
		}
	});

Attributes

<?xml version="1.0" encoding="utf-8"?>
<resources>
	<declare-styleable name="PickerView">
		<attr name="pvTextColor" format="color|reference"/>   // color of the item text ,default is black
		<attr name="pvTextSize" format="dimension|reference"/>  //textsize of the item text ,default is 25dp
		<attr name="pvDisplaySize" format="integer|reference"/>  //display size of the view ,default is 5
		<attr name="pvTextPaddingV" format="dimension|reference"/> // text padding vertically,default is 0
		<attr name="pvTextPaddingH" format="dimension|reference"/> //text padding horizontally,default is 0
		<attr name="pvDividerColor" format="color|reference"/>  // center indicator line color,default is #FFCFCFCF
		<attr name="pvDividerScale" format="fraction"/>  // width of the indicator line,default is 80% of the pickerview
	</declare-styleable>
</resources>

Thanks

WheelView-Android

End

PickerView-Android has been not finished yet,It's just a start version.Lots of ideas waitting to be achieved.
Also glad to receive feedback from u.

pickerview-android's People

Contributors

graycreate avatar

Watchers

 avatar  avatar

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.