本文整理汇总了Java中com.ab.util.AbDialogUtil类的典型用法代码示例。如果您正苦于以下问题:Java AbDialogUtil类的具体用法?Java AbDialogUtil怎么用?Java AbDialogUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbDialogUtil类属于com.ab.util包,在下文中一共展示了AbDialogUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteData
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
/**清理数据*/
private void deleteData(){
//显示进度框
AbDialogUtil.showProgressDialog(getActivity(),R.drawable.progress_circular2,"正在清除...");
AbTaskPool mAbTaskPool = AbTaskPool.getInstance();
//定义异步执行的对象
final AbTaskItem item = new AbTaskItem();
item.setListener(new AbTaskListener() {
@Override
public void update() {
AbDialogUtil.removeDialog(getActivity());
Toast.makeText(getActivity(), "清除成功", Toast.LENGTH_SHORT).show();
}
@Override
public void get() {
DBHelper.deleteAll(db);
};
});
//开始执行
mAbTaskPool.execute(item);
}
示例2: showLoadDialog
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
/**
* 显示刷新弹出框有背景层
*/
public void showLoadDialog() {
final AbLoadDialogFragment mDialogFragment = AbDialogUtil
.showLoadDialog(this, R.drawable.ic_load, "正在查询,请稍候");
mDialogFragment.setAbDialogOnLoadListener(new AbDialogOnLoadListener() {
@Override
public void onLoad() {
// 下载网络数据
downRss(mDialogFragment);
}
});
// 取消的监听
mDialogFragment.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
AbToastUtil.showToast(DialogActivity.this, "Load框被取消");
}
});
}
示例3: showLoadPanel
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
/**
* 显示加载弹出框无背景层
*/
public void showLoadPanel() {
final AbLoadDialogFragment mDialogFragment = AbDialogUtil
.showLoadPanel(this, R.drawable.ic_load, "正在查询,请稍候");
mDialogFragment.setAbDialogOnLoadListener(new AbDialogOnLoadListener() {
@Override
public void onLoad() {
// 下载网络数据
downRss(mDialogFragment);
}
});
// 取消的监听
mDialogFragment.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
AbToastUtil.showToast(DialogActivity.this, "Load框被取消");
}
});
}
示例4: showRefreshDialog
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
/**
* 显示刷新弹出框有背景层
*/
public void showRefreshDialog() {
// 显示重新刷新的框
final AbRefreshDialogFragment mDialogFragment = AbDialogUtil
.showRefreshDialog(this, R.drawable.ic_refresh, "请求出错,请重试");
mDialogFragment.setAbDialogOnLoadListener(new AbDialogOnLoadListener() {
@Override
public void onLoad() {
// 下载网络数据
downRss(mDialogFragment);
}
});
// 取消的监听
mDialogFragment.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
AbToastUtil.showToast(DialogActivity.this, "refresh框被取消");
}
});
}
示例5: showRefreshPanel
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
/**
* 显示刷新弹出框无背景层
*/
public void showRefreshPanel() {
// 显示重新刷新的框
final AbRefreshDialogFragment mDialogFragment = AbDialogUtil
.showRefreshPanel(this, R.drawable.ic_refresh, "请求出错,请重试");
mDialogFragment.setAbDialogOnLoadListener(new AbDialogOnLoadListener() {
@Override
public void onLoad() {
// 下载网络数据
downRss(mDialogFragment);
}
});
mDialogFragment.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
AbToastUtil.showToast(DialogActivity.this, "load框被取消");
}
});
}
示例6: refreshTask
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
public void refreshTask(){
AbTask mAbTask = new AbTask();
final AbTaskItem item = new AbTaskItem();
item.setListener(new AbTaskListener() {
@Override
public void update() {
AbDialogUtil.removeDialog(PullToRefreshViewActivity.this);
mTextView.setText("This is "+new Random().nextInt(100));
mAbPullToRefreshView.onHeaderRefreshFinish();
}
@Override
public void get() {
try {
Thread.sleep(1000);
} catch (Exception e) {
}
};
});
mAbTask.execute(item);
}
示例7: loadMoreTask
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
public void loadMoreTask(){
AbTask mAbTask = new AbTask();
final AbTaskItem item = new AbTaskItem();
item.setListener(new AbTaskListener() {
@Override
public void update() {
AbDialogUtil.removeDialog(PullToRefreshViewActivity.this);
mTextView.append("+"+new Random().nextInt(100));
mAbPullToRefreshView.onFooterLoadFinish();
}
@Override
public void get() {
try {
Thread.sleep(1000);
} catch (Exception e) {
}
};
});
mAbTask.execute(item);
}
示例8: showDialog1
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
private void showDialog1(Context context,String titile,String body){
AbDialogUtil.showAlertDialog(context,
R.drawable.ic_launcher1, titile, body,
new AbDialogOnClickListener() {
@Override
public void onPositiveClick() {
myApp.PRACTISE_TYPE=2;
initArgs(false);
}
@Override
public void onNegativeClick() {
}
});
}
示例9: showDialog
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
public void showDialog(final Context context,LayoutInflater inflater){
View aView=initDialogView(inflater);
AbDialogUtil.showDialog(aView);
Button rightBtn1 = (Button)aView.findViewById(R.id.right_btn_ok);
//右边的按钮
rightBtn1.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
AbDialogUtil.removeDialog(context);
is_next=falg0;
is_exption=falg1;
}
});
}
示例10: refreshTask
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
public void refreshTask(){
AbTask mAbTask = new AbTask();
AbTaskItem item = new AbTaskItem();
item.setListener(new AbTaskListener() {
@Override
public void update() {
AbDialogUtil.removeDialog(ListNestViewPagerActivity.this);
list.clear();
if(newList!=null && newList.size()>0){
list.addAll(newList);
myListViewAdapter.notifyDataSetChanged();
newList.clear();
}
mAbPullToRefreshView.onHeaderRefreshFinish();
}
@Override
public void get() {
try {
Thread.sleep(1000);
currentPage = 1;
newList = new ArrayList<Map<String, Object>>();
Map<String, Object> map = null;
for (int i = 0; i < 10; i++) {
map = new HashMap<String, Object>();
map.put("itemsIcon",mPhotoList.get(i));
map.put("itemsTitle", "item"+i);
map.put("itemsText", "item..."+i);
newList.add(map);
}
} catch (Exception e) {
}
};
});
mAbTask.execute(item);
}
示例11: onResponse
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
@Override
public void onResponse(String response) {
AbDialogUtil.showAlertDialog(HttpMiniActivity.this,"返回结果",response.trim(),new AbDialogOnClickListener(){
@Override
public void onNegativeClick() {
}
@Override
public void onPositiveClick() {
}
});
}
示例12: loadObjectDataTask
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
public void loadObjectDataTask(){
AbTask task = new AbTask();
final AbTaskItem item = new AbTaskItem();
item.setListener(new AbTaskObjectListener(){
@Override
public <T> void update(T entity) {
AbDialogUtil.removeDialog(ThreadControlActivity.this);
AbToastUtil.showToast(ThreadControlActivity.this,(String)entity);
Log.d("TAG", "执行完成:"+(String)entity);
}
@SuppressWarnings("unchecked")
@Override
public String getObject() {
String result = null;
try {
Thread.sleep(3000);
result = "hello andbase";
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
});
task.execute(item);
//task.cancel(mayInterruptIfRunning)
}
示例13: onCreate
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setAbContentView(R.layout.pull_to_refresh_view);
application = (MyApplication)abApplication;
AbTitleBar mAbTitleBar = this.getTitleBar();
mAbTitleBar.setTitleText(R.string.pull_list_name);
mAbTitleBar.setLogo(R.drawable.button_selector_back);
mAbTitleBar.setTitleBarBackground(R.drawable.top_bg);
mAbTitleBar.setTitleTextMargin(10, 0, 0, 0);
mAbTitleBar.setLogoLine(R.drawable.line);
//获取ListView对象
mAbPullToRefreshView = (AbPullToRefreshView)this.findViewById(R.id.mPullRefreshView);
mTextView = (TextView)this.findViewById(R.id.mTextView);
//设置监听器
mAbPullToRefreshView.setOnHeaderRefreshListener(this);
mAbPullToRefreshView.setOnFooterLoadListener(this);
//设置进度条的样式
mAbPullToRefreshView.getHeaderView().setHeaderProgressBarDrawable(this.getResources().getDrawable(R.drawable.progress_circular));
mAbPullToRefreshView.getFooterView().setFooterProgressBarDrawable(this.getResources().getDrawable(R.drawable.progress_circular));
//显示进度框
mDialogFragment = AbDialogUtil.showLoadDialog(this, R.drawable.ic_load, "查询中,请等一小会");
mDialogFragment
.setAbDialogOnLoadListener(new AbDialogOnLoadListener() {
@Override
public void onLoad() {
// 下载网络数据
refreshTask();
}
});
}
示例14: startRecording
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
public void startRecording(){
if(mIMRecorder == null){
mIMRecorder = new IMRecorder(this, new IMRecordListener(){
@Override
public void onRecording(){
AbToastUtil.showToast(ChatActivity.this,"正在录音");
}
@Override
public void onPreRecording(){
AbToastUtil.showToast(ChatActivity.this,"准备录音");
}
@Override
public void onFinish(File file, long time){
AbDialogUtil.showAlertDialog(ChatActivity.this,"录音完成", "录音完成,文件在"+file.getPath()+",长度为:"+AbDateUtil.getTimeDescription(time));
}
@Override
public void onError(int errorCode, String errorMessage){
AbToastUtil.showToast(ChatActivity.this,"提示:"+errorMessage);
}
@Override
public void onCancel(){
// TODO Auto-generated method stub
}
});
}
//开始录音
mIMRecorder.startRecording();
}
示例15: loadFinish
import com.ab.util.AbDialogUtil; //导入依赖的package包/类
/**
* 加载成功调用
*/
public void loadFinish(){
//停止动画
loadStop();
AbDialogUtil.removeDialog(this.getActivity());
}