本文整理汇总了Java中eu.inmite.android.lib.dialogs.SimpleDialogFragment类的典型用法代码示例。如果您正苦于以下问题:Java SimpleDialogFragment类的具体用法?Java SimpleDialogFragment怎么用?Java SimpleDialogFragment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleDialogFragment类属于eu.inmite.android.lib.dialogs包,在下文中一共展示了SimpleDialogFragment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onClick
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.cancel:
SimpleDialogFragment
.createBuilder(this, getSupportFragmentManager())
.setTitle("提示")
.setMessage(
getResources().getString(R.string.cancelA6OrderTip))
.setPositiveButtonText("确定").setNegativeButtonText("取消")
.setRequestCode(REQUEST_CANCEL_ORDER).show();
break;
case R.id.pay:
MyUtils.startApp(this, "com.MobileTicket", "未找到12306官方客户端");
// initPayEnvironment();
break;
}
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:19,代码来源:A6OrderAty.java
示例2: onResume
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
protected void onResume() {
super.onResume();
if(isRecordingTrack){
if(!GpsUtil.isGPSOpen()){
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager())
.setTitle(R.string.dialog_title_gps_not_open_title)
.setMessage(R.string.dialog_title_gps_not_open_msg)
.setPositiveButtonText(R.string.yes)
.setNegativeButtonText(R.string.no)
.setRequestCode(SimpleDialogOpenGpsRequestCode)
.show();
}
}
}
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:17,代码来源:TrackDetailMapActivity.java
示例3: onOptionsItemSelected
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (BuildConfig.DEBUG) Log.d(TAG, "onOptionsItemSelected");
switch (item.getItemId()) {
case R.id.menu_refresh:
refresh();
return true;
case R.id.menu_logout:
SimpleDialogFragment.createBuilder(mActivity, mActivity.getSupportFragmentManager())
.setTitle("Logout")
.setMessage("Are you sure?")
.setPositiveButtonText(android.R.string.yes)
.setNegativeButtonText(android.R.string.cancel)
.setCancelable(true)
.setTargetFragment(this, DIALOG_LOGOUT_CONFIRMATION)
.setRequestCode(DIALOG_LOGOUT_CONFIRMATION)
.show();
return true;
}
return super.onOptionsItemSelected(item);
}
开发者ID:brk3,项目名称:glimmr,代码行数:22,代码来源:BaseFragment.java
示例4: onRequestTokenReady
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
public void onRequestTokenReady(String authUri, Exception e) {
if (FlickrHelper.getInstance().handleFlickrUnavailable(mActivity, e)) {
return;
}
if (e != null) {
/* Usually down to a bad clock / timezone on device */
if (e.getMessage().equals("No authentication challenges found") ||
e.getMessage().equals("Received authentication " +
"challenge is null")) {
SimpleDialogFragment.createBuilder(mActivity, mActivity.getSupportFragmentManager())
.setTitle(R.string.login_problem)
.setMessage(R.string.timezone_message)
.setPositiveButtonText(android.R.string.ok)
.setCancelable(true)
.show();
}
} else if (authUri != null && !authUri.startsWith("error")) {
mActivity.startActivity(new Intent(
Intent.ACTION_VIEW, Uri.parse(authUri)));
}
}
开发者ID:brk3,项目名称:glimmr,代码行数:23,代码来源:LoginFragment.java
示例5: alertProtectDescription
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
private void alertProtectDescription(String strDescription){
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager())
.setTitle("说明")
.setMessage(strDescription)
.setPositiveButtonText("关闭")
.setCancelable(true)
.show();
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:9,代码来源:AntiTheftAty.java
示例6: onOptionsItemSelected
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
break;
case R.id.options_item_edit:
if(scenerys != null && lastPageIndex < scenerys.size()){
Scenery senery = scenerys.get(lastPageIndex);
EditSceneryActivity.launch(activity, senery.getId());
}
break;
case R.id.options_item_delete:
SimpleDialogFragment.createBuilder(activity, getSupportFragmentManager())
.setTitle(R.string.deleteScenery)
.setMessage(R.string.deleteSceneryWarn)
.setPositiveButtonText(R.string.yes)
.setNegativeButtonText(R.string.no)
.setRequestCode(SimpleDialogDeleteSceneryRequestCode)
.show();
break;
}
return super.onOptionsItemSelected(item);
}
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:28,代码来源:ScenerysActivity.java
示例7: onValidationFailed
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
public void onValidationFailed(View view, Rule<?> rule) {
String message = rule.getFailureMessage();
if (view instanceof EditText) {
view.requestFocus();
((EditText) view).setError(message);
} else if (view instanceof CheckBox) {
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setMessage(message).show();
} else {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
}
}
开发者ID:wemakestuff,项目名称:Teracast,代码行数:14,代码来源:RegisterActivity.java
示例8: validate
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
private void validate() {
long start = SystemClock.elapsedRealtime();
final boolean isValid = FormValidator.validate(this, new SimpleErrorPopupCallback(this, true));
long time = SystemClock.elapsedRealtime() - start;
Log.d(getClass().getName(), "validation finished in [ms] " + time);
if (isValid) {
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager())
.setMessage(R.string.validation_success)
.setPositiveButtonText(android.R.string.ok)
.show();
}
}
开发者ID:inmite,项目名称:android-validation-komensky,代码行数:14,代码来源:DemoActivity.java
示例9: initViews
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void initViews() {
if (!a6UserSP.isLogin()) {
startActivity(new Intent(this, A6LoginAty.class));
}
ListView lvPassengers = (ListView) findViewById(R.id.lv1);
try {
mLstPInfos = (List<PassengerInfo>) PersistentUtil.readObject(MyApp
.getInstance().getPathBaseRoot(StoreValue.PASSENGER_INFOS_FILE));
if (mLstPInfos == null){
mLstPInfos = new ArrayList<PassengerInfo>();
}else{
setUserSelfFlag();
}
mAdapter = new PassengerMangAdapter(this, mLstPInfos, new PassengerMangAdapter.OnPMAClickListener() {
@Override
public void onNameClick(View v, int pos) {
PassengerInfo pInfo = mLstPInfos.get(pos);
pInfo.setCommon(pInfo.isCommon()?false:true);
mAdapter.notifyDataSetChanged();
}
@Override
public void onDelClick(View v, int pos) {
mDataIndex = pos;
PassengerInfo pInfo = mLstPInfos.get(mDataIndex);
if (!pInfo.isUserSelf()){
SimpleDialogFragment.createBuilder(PassengerMangAty.this, getSupportFragmentManager())
.setTitle("提示")
.setMessage("确定要删除此乘车人信息吗?")
.setRequestCode(REQUEST_DEL_P)
.setPositiveButtonText("是")
.setNegativeButtonText("否")
.show();
}
}
});
lvPassengers.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1,
int position, long arg3) {
Intent intent = new Intent(PassengerMangAty.this, EditPassengerAty.class);
intent.putExtra(EditPassengerAty.EXTRA_PASSENGER_INFO, mLstPInfos.get(position));
intent.putExtra(EditPassengerAty.EXTRA_OPERATE, EditPassengerAty.EXTRA_OPERATE_EDIT);
startActivityForResult(intent, REQUEST_EDIT);
}
});
lvPassengers.setAdapter(mAdapter);
if (mLstPInfos == null || mLstPInfos.size() == 0) {
SimpleDialogFragment
.createBuilder(this, getSupportFragmentManager())
.setCancelable(false)
.setRequestCode(REQUEST_EMPTY_TIP).setTitle("提示")
.setMessage("乘车人信息为空,是否立即从12306同步乘车人?")
.setPositiveButtonText("是").setNegativeButtonText("否")
.show();
}
} catch (Exception e) {
e.printStackTrace();
}
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:64,代码来源:PassengerMangAty.java
示例10: showMsg
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
public static void showMsg(FragmentActivity context, String msg){
SimpleDialogFragment.createBuilder(context, context.getSupportFragmentManager())
.setTitle("提示").setMessage(msg).setPositiveButtonText("确定").show();
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:5,代码来源:MyUtils.java
示例11: initViews
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
private void initViews() {
imgbtn_huochexing = (ImageButton)findViewById(R.id.help);
imgbtn_huochexing.setOnClickListener(this);
imgbtn_UserInfo = (ImageButton) findViewById(R.id.userInfo);
imgbtn_UserInfo.setOnClickListener(this);
imgbtn_wodecheci = (ImageButton) findViewById(R.id.wodecheci);
imgbtn_wodecheci.setOnClickListener(this);
imgbtn_tianjia = (ImageButton) findViewById(R.id.add);
imgbtn_tianjia.setOnClickListener(this);
imgbtn_zixun = (ImageButton) findViewById(R.id.info);
imgbtn_zixun.setOnClickListener(this);
imgbtn_liaotian = (ImageButton) findViewById(R.id.chat);
imgbtn_liaotian.setOnClickListener(this);
imgbtn_chaxun = (ImageButton) findViewById(R.id.query);
imgbtn_chaxun.setOnClickListener(this);
imgbtn_shezhi = (ImageButton) findViewById(R.id.setup);
imgbtn_shezhi.setOnClickListener(this);
imgbtn_fangdao = (ImageButton) findViewById(R.id.antiTheft);
imgbtn_fangdao.setOnClickListener(this);
findViewById(R.id.order).setOnClickListener(this);
btnUpdate = (ImageButton)findViewById(R.id.update);
btnUpdate.setOnClickListener(this);
btnQuit = (ImageButton)findViewById(R.id.quit);
btnQuit.setOnClickListener(this);
// 检测时区
String strTest = ":" + TimeZone.getDefault().getRawOffset() + "," + TimeZone.getDefault().getRawOffset();
if (TimeZone.getDefault().getRawOffset() != 28800000) {
SimpleDialogFragment
.createBuilder(getApplicationContext(),
getSupportFragmentManager()).setCancelable(true)
.setTitle("时区错误提示" + strTest)
.setMessage(R.string.setTimezoneStr)
.setRequestCode(REQUEST_SET_TIMEZONE)
.setPositiveButtonText("是(推荐)").setNegativeButtonText("否")
.show();
}
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:47,代码来源:MainActivity.java
示例12: initViews
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
private void initViews() {
ivBT = (ImageView) findViewById(R.id.bt);
ivBT.setOnClickListener(this);
ivEarphone = (ImageView)findViewById(R.id.earphone);
ivEarphone.setOnClickListener(this);
ivCharge = (ImageView)findViewById(R.id.charge);
ivCharge.setOnClickListener(this);
ivPocket = (ImageView)findViewById(R.id.pocket);
ivPocket.setOnClickListener(this);
ivRest = (ImageView)findViewById(R.id.rest);
ivRest.setOnClickListener(this);
tvBT = (TextView)findViewById(R.id.bt1);
tvBT.setOnClickListener(this);
tvEarphone = (TextView)findViewById(R.id.earphone1);
tvEarphone.setOnClickListener(this);
tvCharge = (TextView)findViewById(R.id.charge1);
tvCharge.setOnClickListener(this);
tvPocket = (TextView)findViewById(R.id.pocket1);
tvPocket.setOnClickListener(this);
tvRest = (TextView)findViewById(R.id.rest1);
tvRest.setOnClickListener(this);
tvMsg = (TextView)findViewById(R.id.msg);
btnStopAlarm = (Button)findViewById(R.id.stopAlarm);
btnStopAlarm.setOnClickListener(this);
tvBTDevicesTitle = (TextView)findViewById(R.id.antiTheft_tvBTDevicesTitle);
lvBTDevices = (ListView)findViewById(R.id.antiTheft_lvBTDevices);
llytBT = (LinearLayout)findViewById(R.id.antiTheft_llytBT);
lstLayout.add(llytBT);
//隐藏所有扩展选项
toogleLayout(null);
adapter = new SimpleAdapter(this, lstDevices, R.layout.item_anti_theft_connected_bluetooth_device,
new String[]{DEVICE_NAME, DEVICE_ADDRESS},
new int[]{R.id.item_anti_theft_tvDeviceName, R.id.item_anti_theft_tvDeviceAddress});
lvBTDevices.setAdapter(adapter);
MyUtils.setListViewHeightBasedOnChildren(lvBTDevices);
lvBTDevices.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> av, View v,
int arg2, long arg3) {
mBluetoothAdapter.cancelDiscovery();
TextView tvName = (TextView)v.findViewById(R.id.item_anti_theft_tvDeviceName);
TextView tvAddress = (TextView)v.findViewById(R.id.item_anti_theft_tvDeviceAddress);
//保存要绑定的设备地址
lvBTDevices.setTag(tvAddress.getText().toString());
SimpleDialogFragment
.createBuilder(
AntiTheftAty.this,
getSupportFragmentManager())
.setCancelable(false)
.setRequestCode(REQUEST_BIND_OBSERVED_DEVICE)
.setTitle("绑定提示")
.setMessage("确定要绑定设备\"" + tvName.getText() + "\"以开启防盗防护吗?")
.setPositiveButtonText("是")
.setNegativeButtonText("否")
.show();
}
});
//启动服务
mConnIntent = new Intent(AntiTheftAty.this, AntiTheftService.class);
startService(mConnIntent);
bindService(mConnIntent, mServiceConnection, BIND_AUTO_CREATE);
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:67,代码来源:AntiTheftAty.java
示例13: initViews
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
private void initViews() {
btnFrom = (Button) findViewById(R.id.from);
btnFrom.setOnClickListener(this);
btnTo = (Button) findViewById(R.id.to);
btnTo.setOnClickListener(this);
btnTrainNum = (Button) findViewById(R.id.trainNum); // 车次
btnTrainNum.setOnClickListener(this);
etDate = (EditText)findViewById(R.id.date);
btnDate = (Button) findViewById(R.id.btnDate); // 选择乘车日期
btnDate.setOnClickListener(this);
btnOK = (Button) findViewById(R.id.ok);
btnOK.setOnClickListener(this);
etTravelName = (EditText) findViewById(R.id.travelName);
etTime = (EditText) findViewById(R.id.time);
btnFrom.setText(setSP.getLastFromStationKey());
btnTo.setText(setSP.getLastToStationKey());
// 取得当前日期
Calendar c = Calendar.getInstance(Locale.getDefault());
c.setTimeInMillis(System.currentTimeMillis());
intYear = c.get(Calendar.YEAR);
intMonth = c.get(Calendar.MONTH);
intDay = c.get(Calendar.DAY_OF_MONTH);
String strDate = TimeUtil.getDFormat().format(c.getTime());
etDate.setText(strDate + " " + TimeUtil.getWeek(c.getTime()));
etDate.setTag(strDate);
if (this.getIntent().getStringExtra(TRAIN_NUM) != null){
strTrainNum = this.getIntent().getStringExtra(TRAIN_NUM);
btnFrom.setText(this.getIntent().getStringExtra(START_STATION));
btnTo.setText(this.getIntent().getStringExtra(END_STATION));
intDataSource = this.getIntent().getIntExtra(DATA_SOURCE, DATA_FROM_OFFINE_DB);
if (intDataSource == DATA_FROM_OFFINE_DB){
SimpleDialogFragment
.createBuilder(
AddInfoAty.this,
getSupportFragmentManager())
.setCancelable(false)
.setRequestCode(REQUET_SET_TRAVEL_BRIEF_OF_DATA_FROM_OFFLINE_DB)
.setTitle("提示")
.setMessage("检测到您采用离线数据快速添加数据,为保证数据准确性请您手动进行车次选择"+SF.TIP)
.setPositiveButtonText("确定")
.show();
}
String strStartTime = getIntent().getStringExtra(EXTRA_START_TIME);
if (!TextUtils.isEmpty(strStartTime)){
try {
Date date1 = TimeUtil.getDFormat().parse(strStartTime);
strStartTime = TimeUtil.getDFormat().format(date1);
etDate.setText(strStartTime + " " + TimeUtil.getWeek(strStartTime));
etDate.setTag(strStartTime);
} catch (ParseException e) {
e.printStackTrace();
}
}
getTrains();
}
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:60,代码来源:AddInfoAty.java
示例14: onClick
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
public void onClick(View v) {
switch(v.getId()){
case R.id.llyt1:
switch(searchType){
case SEARCH_STATION:
dlgClearStations = SimpleDialogFragment.createBuilder(SelectAty.this, getSupportFragmentManager())
.setTitle("清除历史记录")
.setMessage("确认要清除历史记录吗?")
.setRequestCode(REQUEST_CLEAR_STATIONS)
.setPositiveButtonText("确定")
.setNegativeButtonText("取消")
.show();
break;
case SEARCH_TRAIN_NUM:
dlgClearTraiNums = SimpleDialogFragment.createBuilder(SelectAty.this, getSupportFragmentManager())
.setTitle("清除历史记录")
.setMessage("确认要清除历史记录吗?")
.setRequestCode(REQUEST_CLEAR_TRAIN_NUMS)
.setPositiveButtonText("确定")
.setNegativeButtonText("取消")
.show();
break;
}
notifyAdapterDataChanged(null);
break;
case R.id.result:
String strResult = btnResultText.getText().toString();
Intent intent = new Intent();
intent.putExtra(RESULT_KEY, strResult);
intent.putExtra(RESULT_VALUE, strResult);
SelectAty.this.setResult(RESULT_OK, intent);
//存储历史
switch(searchType){
case SEARCH_STATION:
myDB.updateHistory("Station", strResult, strResult);
break;
case SEARCH_TRAIN_NUM:
myDB.updateHistory("TrainNum", strResult, strResult);
break;
}
//结束当前Activity
SelectAty.this.finish();
break;
case R.id.voice:
//打开迅飞语音识别界面
createXunFeiDialog();
break;
}
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:52,代码来源:SelectAty.java
示例15: onClick
import eu.inmite.android.lib.dialogs.SimpleDialogFragment; //导入依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btnStart:
if(!GsfUtil.isGsfInstalled()){
//没有谷歌服务框架
ToastUtil.showToastInfo((Activity)getContext(),
R.string.strErrorNoGsf,
Style.ALERT,
false);
return;
}
btnStart.setEnabled(false);
Track track = TrackManager.getInstance().getCurTrack();
if(track != null){
if(track.getRecordStatus() == RecordStatus.recording.getValue()){
TrackManager.getInstance().pauseTrackAsyc();
}else if(track.getRecordStatus() == RecordStatus.paused.getValue()){
TrackManager.getInstance().resumeTrackAsyc();;
}else{
TrackManager.getInstance().startTrackAsyc();
}
}else{
isStartLaunchMap = true;
TrackManager.getInstance().startTrackAsyc();
}
break;
case R.id.btnStop:
Activity act = (Activity) getContext();
if(act instanceof BaseActionBarActivity){
SimpleDialogFragment.createBuilder(act, ((BaseActionBarActivity)act).getSupportFragmentManager())
.setTitle(strTrackStopConfirmTitle)
.setMessage(strTrackStopConfirmMsg)
.setPositiveButtonText(R.string.yes)
.setNegativeButtonText(R.string.no)
.setRequestCode(requestCodeStopTrack)
.show();
}else{
stopTrack();
}
break;
default:
break;
}
}
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:50,代码来源:TrackCtrlView.java
注:本文中的eu.inmite.android.lib.dialogs.SimpleDialogFragment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论