-
Android
Android 开发资料,包括所有的Android 开发API(Android api develop)
- 2015-10-06 19:41:13下载
- 积分:1
-
tower of hanoi
河内塔问题的一个简单java程序
- 2022-07-08 01:46:07下载
- 积分:1
-
android 自定义radiogroup实现源码下载-listview+radiobutton实现
listview radiobutton 实现 浅显易懂
- 2015-04-14下载
- 积分:1
-
仿IOS 对话框
package com.zf.iosdialog.widget;import android.app.Dialog;import android.content.Context;import android.view.Display;import android.view.LayoutInflater;import android.view.View;import android.view.View.OnClickListener;import android.view.WindowManager;import android.widget.Button;import android.widget.FrameLayout;import android.widget.ImageView;import android.widget.LinearLayout;import android.widget.LinearLayout.LayoutParams;import android.widget.TextView;import com.zf.iosdialog.R;public class AlertDialog {private Context context;private Dialog dialog;private LinearLayout lLayout_bg;private TextView txt_title;private TextView txt_msg;private Button btn_neg;private Button btn_pos;private ImageView img_line;private Display display;private boolean showTitle = false;private boolean showMsg = false;private boolean showPosBtn = false;private boolean showNegBtn = false;public AlertDialog(Context context) {this.context = context;WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);display = windowManager.getDefaultDisplay();}public AlertDialog builder() {// 获取Dialog布局View view = LayoutInflater.from(context).inflate(R.layout.view_alertdialog, null);// 获取自定义Dialog布局中的控件lLayout_bg = (LinearLayout) view.findViewById(R.id.lLayout_bg);txt_title = (TextView) view.findViewById(R.id.txt_title);txt_title.setVisibility(View.GONE);txt_msg = (TextView) view.findViewById(R.id.txt_msg);txt_msg.setVisibility(View.GONE);btn_neg = (Button) view.findViewById(R.id.btn_neg);btn_neg.setVisibility(View.GONE);btn_pos = (Button) view.findViewById(R.id.btn_pos);btn_pos.setVisibility(View.GONE);img_line = (ImageView) view.findViewById(R.id.img_line);img_line.setVisibility(View.GONE);// 定义Dialog布局和参数dialog = new Dialog(context, R.style.AlertDialogStyle);dialog.setContentView(view);// 调整dialog背景大小lLayout_bg.setLayoutParams(new FrameLayout.LayoutParams((int) (display.getWidth() * 0.85), LayoutParams.WRAP_CONTENT));return this;}public AlertDialog setTitle(String title) {showTitle = true;if ("".equals(title)) {txt_title.setText("标题");} else {txt_title.setText(title);}return this;}public AlertDialog setMsg(String msg) {showMsg = true;if ("".equals(msg)) {txt_msg.setText("内容");} else {txt_msg.setText(msg);}return this;}public AlertDialog setCancelable(boolean cancel) {dialog.setCancelable(cancel);return this;}public AlertDialog setPositiveButton(String text,final OnClickListener listener) {showPosBtn = true;if ("".equals(text)) {btn_pos.setText("确定");} else {btn_pos.setText(text);}btn_pos.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {listener.onClick(v);dialog.dismiss();}});return this;}public AlertDialog setNegativeButton(String text,final OnClickListener listener) {showNegBtn = true;if ("".equals(text)) {btn_neg.setText("取消");} else {btn_neg.setText(text);}btn_neg.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {listener.onClick(v);dialog.dismiss();}});return this;}private void setLayout() {if (!showTitle && !showMsg) {txt_title.setText("提示");txt_title.setVisibility(View.VISIBLE);}if (showTitle) {txt_title.setVisibility(View.VISIBLE);}if (showMsg) {txt_msg.setVisibility(View.VISIBLE);}if (!showPosBtn && !showNegBtn) {btn_pos.setText("确定");btn_pos.setVisibility(View.VISIBLE);btn_pos.setBackgroundResource(R.drawable.alertdialog_single_selector);btn_pos.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {dialog.dismiss();}});}if (showPosBtn && showNegBtn) {btn_pos.setVisibility(View.VISIBLE);btn_pos.setBackgroundResource(R.drawable.alertdialog_right_selector);btn_neg.setVisibility(View.VISIBLE);btn_neg.setBackgroundResource(R.drawable.alertdialog_left_selector);img_line.setVisibility(View.VISIBLE);}if (showPosBtn && !showNegBtn) {btn_pos.setVisibility(View.VISIBLE);btn_pos.setBackgroundResource(R.drawable.alertdialog_single_selector);}if (!showPosBtn && showNegBtn) {btn_neg.setVisibility(View.VISIBLE);btn_neg.setBackgroundResource(R.drawable.alertdialog_single_selector);}}public void show() {setLayout();dialog.show();}}
- 2015-01-03下载
- 积分:1
-
Cards-UI-master
卡片式View,支持单个卡片,item为卡片的ListView
使用:
CardListView list = ...
list.setCardTheme(CardTheme.Dark)
CardAdapter adapter = new CardAdapter(this, android.R.color.holo_blue_dark)
list.setAdapter(adapter)
// Alternatively, you can pass a context and string resources in place of strings
// CardHeader has an optional second parameter for a subtitle
CardHeader header = new CardHeader( I m a header )
// You can optionally set an action to the header
// Specifying no action title will default to See More
header.setAction( See More , new CardHeader.ActionListener() {
@Override
public void onHeaderActionClick(CardHeader header) {
// Do whatever you want
}
})
// Add the header to the adapter, automatically notifies the list
adapter.add(header)
// Again, you can pass a context and string resources in place of strings
Card card = new Card( Hello , My name is Aidan )
adapter.add(card) (This library is no longer maintained, as this implementation is generally frowned upon in the new Google Material design guidelines, excluding certain situations (like Google Keep type UI). See the new CardView APIs in the Support Library.)
- 2015-01-24 15:06:35下载
- 积分:1
-
CircleText
android 画圆、画矩形、写字、椭圆、扇形(Android painting circle, painting rectangular, write, elliptical, fan
)
- 2012-12-09 20:16:07下载
- 积分:1
-
Android-MMS
实现Android 彩信发送,实现Android 自定义彩信发送(To Android MMS sent to achieve Android custom MMS sent)
- 2013-04-12 15:45:29下载
- 积分:1
-
jrtplib库案例
jrtplib库使用案例,对入门理解jrtplib的工作原理和流程有很大的帮助,从面向过程到面向对象逐渐提升,具备良好的可读性,需要安装jthread、jrtplib库(包含在内)。
- 2022-12-06 18:30:02下载
- 积分:1
-
源代码管理
嗨,它的代码是使用snmp4j在java中为manipualtion snmp客户机和trapreciver编写的,最后是示例非产品
- 2022-11-16 08:45:04下载
- 积分:1
-
wabacus 国内java开源框架
Wabacus是一个JavaEE快速开发框架,采用面向声明的开发模式,可以不用编程或极少编程即可实现复杂的数据展示、数据编辑、表单处理等功能,将JavaEE的开发效率提高5倍以上,代码减少60%以上
- 2022-04-21 00:19:35下载
- 积分:1