All Projects → Qiaoidea → ActionSheet

Qiaoidea / ActionSheet

Licence: other
Android中的ActionSheet(仿IOS ui界面)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ActionSheet

actionsheet-android
iPad-style ActionSheet for Android
Stars: ✭ 21 (+23.53%)
Mutual labels:  actionsheet, android-actionsheet
vue2-dialog
A mobile Vue plugin for VueDialog
Stars: ✭ 21 (+23.53%)
Mutual labels:  actionsheet
Fsactionsheet
模仿微信底部ActionSheet, 支持横屏, 最低支持iOS6.
Stars: ✭ 77 (+352.94%)
Mutual labels:  actionsheet
menu
Simplistic, effortless menu building API originally built for Laravel use, now a seamlessly independent package.
Stars: ✭ 14 (-17.65%)
Mutual labels:  menu-generator
Zhpopupcontroller
Help you pop up custom views easily. and support pop-up animation, layout position, mask effect and gesture interaction etc.
Stars: ✭ 1,481 (+8611.76%)
Mutual labels:  actionsheet
CWActionSheet
模仿微信ActionSheet
Stars: ✭ 47 (+176.47%)
Mutual labels:  actionsheet
Sheeeeeeeeet
Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.
Stars: ✭ 1,177 (+6823.53%)
Mutual labels:  actionsheet
CodeIgniter-Adjacency-List
Simple implementation with nestedSortable plugin.
Stars: ✭ 18 (+5.88%)
Mutual labels:  menu-generator
ImageActionSheet
iOS Native style action sheet like in Whatsapp with the option of showing icons. It is a complete implementation and does not use any private api of UIKit.
Stars: ✭ 20 (+17.65%)
Mutual labels:  actionsheet
django-menu-generator
A straightforward menu generator for Django
Stars: ✭ 24 (+41.18%)
Mutual labels:  menu-generator
Alertift
Swifty, modern UIAlertController wrapper.
Stars: ✭ 242 (+1323.53%)
Mutual labels:  actionsheet
Sdcalertview
The little alert that could
Stars: ✭ 1,768 (+10300%)
Mutual labels:  actionsheet
menutray
An application menu through a GTK+ tray status icon.
Stars: ✭ 62 (+264.71%)
Mutual labels:  menu-generator
Overlaycontroller
OverlayController easily pop your custom view and provide optional transition animation. written in swift 5.0
Stars: ✭ 94 (+452.94%)
Mutual labels:  actionsheet
PHP-Quick-Menu
This is a PHP Multilevel Menu class. From nested Json|Array to Html menu (ul)
Stars: ✭ 25 (+47.06%)
Mutual labels:  menu-generator
React Native Actionsheet
An elegant ActionSheet component for React Native.
Stars: ✭ 1,188 (+6888.24%)
Mutual labels:  actionsheet
Tfpopup
🚀🚀🚀TFPopup不生产弹框,它只是弹框的弹出工🚀🚀🚀默认支持多种动画方式一行调用,支持完全自定义动画.
Stars: ✭ 182 (+970.59%)
Mutual labels:  actionsheet
JhScrollActionSheetView
JhScrollActionSheetView - UIcollectionView横向滚动,类似微博新版的详情页分享界面,可设置单排或双排显示,title不设置不显示title,如果想实现发送站内用户的功能,自己可以改一下代码
Stars: ✭ 13 (-23.53%)
Mutual labels:  actionsheet
menus
Laravel Enso main menu manager, for easy management of the application menus straight from the interface, whether that means adding, removing or reordering them
Stars: ✭ 15 (-11.76%)
Mutual labels:  menu-generator
LGApplications
个人小demo集合:①ActionSheet; ②PickerView; ③ScrollView嵌套; ④渐变文字Label; ⑤tableView实现单选;
Stars: ✭ 36 (+111.76%)
Mutual labels:  actionsheet

ActionSheet

参照ios中的 actionsheet样式做的Android ui界面。详解参见博客仿IOS控件之ActionSheet

效果图

包含两种界面,四种样式:

  1. 顶部下拉layout菜单 和 底部弹出式ActionSheet菜单

Screenshot    Screenshot

  1. 后来,在此基础上,整合了baoyz的AcitonSheet,添加了带title通用性更强但是耦合性稍差的新样式菜单

有两种样式,分别为IOS6和IOS7风格

Screenshot    Screenshot

如何使用

项目本身体积不大,可以引用库或者直接拷贝至自己的项目中去,使用方法很简单

1. 第一种顶部弹出菜单ActionSheetLayout。

ActionSheetLayout就当做普通的linearlayout来使用,然后调用
布局中xml

<com.qiao.actionsheet.view.ActionSheetLayout
            android:id="@+id/action_sheet_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent" >
            <!-- 当做linearlayout使用-->
</com.qiao.actionsheet.view.ActionSheetLayout>

java代码

	actionSheetLayout = (ActionSheetLayout) findViewById(R.id.action_sheet_layout);

	//直接调用hide()和()来控制显示隐藏
	if(actionSheetLayout.isShow()){
		actionSheetLayout.hide();
	}else{
		actionSheetLayout.show();
	}

2. 底部弹出菜单ActionSheet

使用很简单:

	final ActionSheet actionSheet = new ActionSheet(MainActivity.this);
	actionSheet.show("确定要退出么?",new String[]{"退出" },new Action1<Integer>(){
		@Override
		public void invoke(Integer index) {
			actionSheet.hide();
			if(index==0){
				MainActivity.this.finish();
			}
		}
	});

3. 使用baoyz兄的Actionsheet整改后的

具体使用见代码demo

		baoyz.qiao.actionsheet.ActionSheet.init(this)
				.setTitle("This is test title ,do you want do something?")
				.setTheme(resid)
				.setItemTexts("Item1", "Item2", "Item3", "Item4")
				.setItemClickListener(new ItemClikListener() {
					@Override
					public void onitemClick(
							baoyz.qiao.actionsheet.ActionSheet actionSheet,
							int index) {
						Toast.makeText(getApplicationContext(), "click item index = " + index,0).show();
					}
				})
				.setCancelText("Cancel")
//				.setCancelText("Cancel",new CancelListener() {
//					@Override
//					public void onCancelClick(ActionSheet actionSheet) {
//						Toast.makeText(getApplicationContext(), "dismissed ", 0).show();
//					}
//				})
				.show();

其中,

  • setTheme() 参数可选 R.style.ActionSheetStyleIOS6 或 R.style.ActionSheetStyleIOS6 。不设置则默认为 R.style.ActionSheetStyleIOS7。注:
  • 不设置 setTitle 则为无title样式
  • setCanTouchOutside(false) 点击选项外无响应,默认为true,点击隐藏
  • 不设置 setCancelText() 则不显示取消按钮。其参数有两个,第一个string为显示内容,第二个listener为对应事件
  • 最后,别忘记 show() 让其显示。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].