当前位置: 首页>>代码示例>>Java>>正文


Java AppMsg类代码示例

本文整理汇总了Java中com.devspark.appmsg.AppMsg的典型用法代码示例。如果您正苦于以下问题:Java AppMsg类的具体用法?Java AppMsg怎么用?Java AppMsg使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AppMsg类属于com.devspark.appmsg包,在下文中一共展示了AppMsg类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onActivityResult

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    switch (requestCode) {
        case 0://小K授权
            if (resultCode == Activity.RESULT_CANCELED) {
                //获取授权失败
                if (data == null) {
                    AppMsg.makeText(getActivity(), "获取授权失败,请检查网络", AppMsg.STYLE_CONFIRM).show();
                } else {
                    AppMsg.makeText(getActivity(), "获取授权失败:" + data.getStringExtra(AtyOauth.RESULT_EXT_RESULT), AppMsg.STYLE_CONFIRM).show();
                }
            } else {
                //获取授权成功
                Settings.writeAuth(getActivity(), data.getStringExtra(AtyOauth.RESULT_EXT_USER_NAME),
                        data.getStringExtra(AtyOauth.RESULT_EXT_USER_ID),
                        data.getStringExtra(AtyOauth.RESULT_EXT_ACCESS_TOKEN),
                        data.getStringExtra(AtyOauth.RESULT_EXT_REFRESH_TOKEN),
                        data.getIntExtra(AtyOauth.RESULT_EXT_EXPIRES_IN, 0), System.currentTimeMillis());
                getActivity().sendBroadcast(new Intent(Unit.ACTION_AUTH_OK));
                loadDevices(false);
                AppMsg.makeText(getActivity(), "授权成功:" + data.getStringExtra(AtyOauth.RESULT_EXT_USER_NAME), AppMsg.STYLE_INFO).show();
            }
            break;
    }
}
 
开发者ID:liangchenhe55,项目名称:konkeWatch,代码行数:27,代码来源:FmMain.java

示例2: showSuccessResult

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@UiThread
void showSuccessResult(BookModel.BookList l){

    // new search
    if(bookadapter == null){
        count = l.getCount();
        setListViewAdapter(l.getBooks());
        String tips = getString(R.string.tips_searchbook_count) + count;
        swipe_refresh.setRefreshing(false);
        AppMsg.makeText(getSherlockActivity(),tips,AppMsg.STYLE_INFO).show();
    }else{
        // next page;
        bookadapter.addAll(l.getBooks());
        pullListView.onRefreshComplete();

        bookadapter.notifyDataSetChanged();
        adapter.notifyDataSetChanged();
    }
}
 
开发者ID:iSCAU,项目名称:iSCAU-Android,代码行数:20,代码来源:SearchBook.java

示例3: showSuccessResult

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@UiThread
void showSuccessResult(CardRecordModel.RecordList l){

    // new search
    if(cardadapter == null){
        count = l.getCount();
        setListViewAdapter(l.getRecords());
        String tips = getString(R.string.tips_card_record_count) + count;
        AppMsg.makeText(getSherlockActivity(),tips,AppMsg.STYLE_INFO).show();
        UIHelper.getDialog().dismiss();
    }else{
        // next page;
        cardadapter.addAll(l.getRecords());
        pullListView.onRefreshComplete();
        cardadapter.notifyDataSetChanged();
        adapter.notifyDataSetChanged();
        pullListView.setRefreshing(false);
    }

    ActionBar actionBar = getSherlockActivity().getSupportActionBar();
    actionBar.setSubtitle(getString(R.string.title_sub_card) + l.getAmount());
}
 
开发者ID:iSCAU,项目名称:iSCAU-Android,代码行数:23,代码来源:Card.java

示例4: onSongDownload

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
public void onSongDownload(final Track t) {

        t.setLocalPath(Environment.getExternalStorageDirectory() + "/" + Environment.DIRECTORY_MUSIC + "/" + t.getTitle() + ".mp3");

        final ProgressDialog dialog = new ProgressDialog(getActivity());
        dialog.setTitle("Please wait");
        dialog.setMessage("Currently downloading " + t.getTitle() + "...");
        dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        dialog.show();

        Ion.with(getActivity())
                .load(t.getDownloadUrl())
                .progressDialog(dialog)
                .write(new File(t.getLocalPath()))
                .setCallback(new FutureCallback<File>() {
                    @Override
                    public void onCompleted(Exception e, File file) {
                        t.save();
                        dialog.hide();
                        AppMsg.makeText(getActivity(), "Download complete!", AppMsg.STYLE_INFO).show();
                        EventBus.getDefault().post(new MusicDownloadedEvent(t.getLocalPath()));
                    }
                });
    }
 
开发者ID:ForkITdev,项目名称:androidlx_2014,代码行数:25,代码来源:SearchFragment.java

示例5: onSongDownload

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
public void onSongDownload(final Track t) {

        t.setLocalPath(Environment.getExternalStorageDirectory() + "/" + Environment.DIRECTORY_MUSIC + "/" + t.getTitle() + ".mp3");

        final ProgressDialog dialog = new ProgressDialog(getActivity());
        dialog.setTitle("Please wait");
        dialog.setMessage("Currently downloading " + t.getTitle() + "...");
        dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        dialog.show();

        Ion.with(getActivity())
                .load(t.getDownloadUrl())
                .progressDialog(dialog)
                .write(new File(t.getLocalPath()))
                .setCallback(new FutureCallback<File>() {
                    @Override
                    public void onCompleted(Exception e, File file) {
                        t.save();
                        dialog.hide();
                        AppMsg.makeText(getActivity(), "Download complete!", AppMsg.STYLE_INFO).show();
                    }
                });
    }
 
开发者ID:ForkITdev,项目名称:androidlx_2014,代码行数:24,代码来源:SearchFragment.java

示例6: onSongDownload

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
public void onSongDownload(final Track t) {

        t.setLocalPath(Environment.getExternalStorageDirectory() + "/" + Environment.DIRECTORY_MUSIC + "/" + t.getTitle() + ".mp3");

        final ProgressDialog dialog = new ProgressDialog(getActivity());
        dialog.setTitle("Please wait");
        dialog.setMessage("Currently downloading " + t.getTitle() + "...");
        dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        dialog.show();

        Ion.with(getActivity())
                .load(t.getDownloadUrl())
                .progressDialog(dialog)
                .write(new File(t.getLocalPath()))
                .setCallback(new FutureCallback<File>() {
                    @Override
                    public void onCompleted(Exception e, File file) {
                        dialog.hide();
                        AppMsg.makeText(getActivity(), "Download complete!", AppMsg.STYLE_INFO).show();
                    }
                });
    }
 
开发者ID:ForkITdev,项目名称:androidlx_2014,代码行数:23,代码来源:SearchFragment.java

示例7: onReceive

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
	// model finished load threads
	Log.d("zen", "onReceive");
	ZenMainActivity ac = (ZenMainActivity)mContext;
	ac.showLoadingView(false);
	mThreadsListView.onRefreshComplete();
	String action = intent.getAction();
	if (action.equals(ZenThreadsModel.DidFinishedLoad)) {
		
		mThreadsAdapter.array = mModel.threads;
		mThreadsAdapter.notifyDataSetChanged();
		mList.scrollTo(0, 0);
	}
	else if(action.equals(ZenThreadsModel.DidFailedLoad)) {
		AppMsg appmsg = AppMsg.makeText(ac, "����ʧ��...", AppMsg.STYLE_ALERT);
		appmsg.show();
	}
}
 
开发者ID:nihaoyalong,项目名称:zen4android,代码行数:20,代码来源:ZenThreadsFragment.java

示例8: onReceive

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
	System.out.println("Receive Notification: " + intent.getAction());
	String action = intent.getAction();
	mLoadingView.hide();
	if (action.equals(ZenNotificationModel.ZEN_NEW_NOTIFICATION)) {
		mAdapter.setNotifications(model.notifications);
		mAdapter.notifyDataSetChanged();
	}
	else if (action.equals(ZenNotificationModel.ZEN_NOTIFICATION_EMPTY)) {
		mAdapter.clear();
	}
	else if (action.equals(ZenNotificationModel.ZEN_LOAD_NOTIFICATION_FAILED)) {
		AppMsg appmsg = AppMsg.makeText(ZenNotificationActivity.this, "�볡���Ѽ���ʧ��", AppMsg.STYLE_ALERT);
		appmsg.show();
	}
}
 
开发者ID:nihaoyalong,项目名称:zen4android,代码行数:18,代码来源:ZenNotificationActivity.java

示例9: comment

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
private void comment() {
	if (mModel.threadData.subject == null) {
		AppMsg appMsg = AppMsg.makeText(this, "���Ӽ�����ɺ��������", AppMsg.STYLE_ALERT);
		appMsg.show();
		return;
	}
	if (isLogin()) {
		Intent intent = new Intent(this, ZenPostActivity.class);
		intent.putExtra("type", ZenPostActivity.ZEN_TYPE_COMMENT);
		intent.putExtra("title", mModel.threadData.subject);
		intent.putExtra("fid", mFid);
		intent.putExtra("tid", mTid);
		intent.putExtra("subject", mModel.threadData.subject);
		intent.putExtra("pid", "");
		startActivity(intent);
	}
}
 
开发者ID:nihaoyalong,项目名称:zen4android,代码行数:18,代码来源:ZenContentActivity.java

示例10: OnOpenVideo

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@JavascriptInterface
public void OnOpenVideo(String url) {
	System.out.println("OnOpenVideo:" + url);
	if (url != null) {
		String videoUrl = ZenVideoParser.parser(url);
		System.out.println("OnOpenVideo: after parser" + videoUrl);
		if (videoUrl != null) {
			mHandler.post(new ZenOpenChrome(ZenContentActivity.this, videoUrl));
		}
		else {
			mHandler.post(new Runnable() {
				
				@Override
				public void run() {
					AppMsg appmsg = AppMsg.makeText(ZenContentActivity.this,
							"��ʱ��֧�ָ���Ƶ��ʽ", AppMsg.STYLE_ALERT);
					appmsg.show();
				}
			});
		}
		
	}
}
 
开发者ID:nihaoyalong,项目名称:zen4android,代码行数:24,代码来源:ZenContentActivity.java

示例11: run

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override
public void run()
{
	if(result != null)
	{
		if(busTimes != null)
		{
			AppMsg.makeText((Activity) myContext, myContext.getString(R.string.info_successful), AppMsg.STYLE_INFO).show();
		}
		else
		{
			// Downloaded but couldn't be parsed
			AppMsg.makeText((Activity) myContext, myContext.getString(R.string.info_noTimes), AppMsg.STYLE_CONFIRM).show();
		}
		
		((Times) myContext).updateInformation(myBus);
	}
	else
	{
		AppMsg.makeText((Activity) myContext, myContext.getString(R.string.error_noConnection), AppMsg.STYLE_ALERT).show();
	}
	
	((Times) myContext).toggleProgressBar(false);
	
	myPtrView.onRefreshComplete();
}
 
开发者ID:mehmetakiftutuncu,项目名称:eshotroid-legacy,代码行数:27,代码来源:GetTimesPageTask.java

示例12: run

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override
public void run()
{
	if(result != null)
	{
		if(busses != null)
		{
			AppMsg.makeText((Activity) myContext, myContext.getString(R.string.info_successful), AppMsg.STYLE_INFO).show();
			
			((Main) myContext).setBussesList(busses);
		}
		else
		{
			// Downloaded but couldn't be parsed
			myPtrList.setAdapter(oldAdapter);
		}
	}
	else
	{
		AppMsg.makeText((Activity) myContext, myContext.getString(R.string.error_noConnection), AppMsg.STYLE_ALERT).show();
	}
	
	((Main) myContext).toggleMode(false);
	
	myPtrList.onRefreshComplete();
}
 
开发者ID:mehmetakiftutuncu,项目名称:eshotroid-legacy,代码行数:27,代码来源:GetBussesPageTask.java

示例13: loginClick

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override
public void loginClick() {
  final String email = binding.etEmail.getText().toString();
  final String password = binding.etPassword.getText().toString();
  if (TextUtils.isEmpty(email)) {
    AppMsg.makeText(this, R.string.email_not_null, AppMsg.STYLE_ALERT).show();
    return;
  }
  if (TextUtils.isEmpty(password)) {
    AppMsg.makeText(this, R.string.password_not_null, AppMsg.STYLE_ALERT).show();
    return;
  }
  mPresenter.login(email, password);
}
 
开发者ID:donglua,项目名称:ZoomEyeAndroid,代码行数:15,代码来源:LoginActivity.java

示例14: loginSuccess

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override public void loginSuccess() {
  AppMsg.makeText(this, getString(R.string.login_success), AppMsg.STYLE_INFO).show();

  rx.Observable.just("").delay(300, TimeUnit.MILLISECONDS)
      .observeOn(AndroidSchedulers.mainThread())
      .subscribe(s -> {
        startActivity(new Intent(this, SearchActivity.class));
        finish();
      });
}
 
开发者ID:donglua,项目名称:ZoomEyeAndroid,代码行数:11,代码来源:LoginActivity.java

示例15: onPostExecute

import com.devspark.appmsg.AppMsg; //导入依赖的package包/类
@Override
protected void onPostExecute(String result) {
    try {
        result = result.trim();
        String[] parts = result.split(":");
        if (!parts[0].isEmpty() && !parts[1].isEmpty() && Integer.valueOf(parts[0]) > CURRENT_VERSION) {
            // there's a new version
            AppMsg appMsg = AppMsg.makeText(activity, activity.getString(R.string.new_version_detected)
                    + " (" + parts[1] + ")", new AppMsg.Style(AppMsg.LENGTH_LONG, R.color.colorAccent));
            appMsg.setLayoutGravity(Gravity.TOP);
            appMsg.setDuration(8000);  // 8 seconds
            appMsg.getView().setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    view.getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(NOTES)));
                }
            });
            if (preferences.getBoolean("transparent_nav", false) && activity.getResources()
                    .getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
                appMsg.setLayoutParams(Dimension.getParamsAppMsg(activity));
            }
            appMsg.show();
        }
        if (!parts[0].isEmpty())
            preferences.edit().putLong("latest_update_check", System.currentTimeMillis()).apply();
    } catch (Exception e) {
        Log.e(TAG, "Sad face... Error", e);
    } finally {
        activity = null;
        preferences = null;
    }
}
 
开发者ID:indywidualny,项目名称:FaceSlim,代码行数:33,代码来源:CheckUpdatesTask.java


注:本文中的com.devspark.appmsg.AppMsg类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。