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


Java AppMsg.show方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: save

import com.devspark.appmsg.AppMsg; //导入方法依赖的package包/类
private void save() {
	if (!isExternalStorageWritable()) {
		AppMsg appmsg = AppMsg.makeText(this, "����ʧ�ܣ������SD��",
				AppMsg.STYLE_ALERT);
		appmsg.show();
		return;
	}
	if (isGif) {
		saveGIF();
	} else {
		saveJPEG();
	}
}
 
开发者ID:nihaoyalong,项目名称:zen4android,代码行数:14,代码来源:ZenPhotoActivity.java

示例6: OnSendClick

import com.devspark.appmsg.AppMsg; //导入方法依赖的package包/类
@Override
public void OnSendClick(String content) {
	ZenLoginModel loginModel = ZenLoginModel.getInstance();
	String token = loginModel.userInfo.token;
	if (content.matches("")) {
		AppMsg appmsg = AppMsg.makeText(ZenContentActivity.this,
				"����������...", AppMsg.STYLE_ALERT);
		appmsg.show();
		return;
	}
	switch (mType) {
	case ZEN_TYPE_REPLY:
		mLoading.show("���ڷ���...");
		mCommentModel.comment(content, mReplyData.pid, token);
		break;
	case ZEN_TYPE_PM:
		mLoading.show("���ڷ���...");
		mCommentModel.send(content, "roger.qian");
		break;
	case ZEN_TYPE_COMMENT:
		mLoading.show("���ڷ���...");
		mCommentModel.comment(content, "", mModel.threadData.subject);
		break;
	case ZEN_TYPE_RECOMMEND:
		mLoading.show("���ڷ���...");
		mCommentModel.recommend(mModel.threadData.subject, content,
				token);
		break;
	}
}
 
开发者ID:nihaoyalong,项目名称:zen4android,代码行数:31,代码来源:ZenContentActivity.java

示例7: hint

import com.devspark.appmsg.AppMsg; //导入方法依赖的package包/类
private void hint() {
	String json = ZenJSONUtil.ReadJSONFromFile(ZEN_FILE);
	if (json == null || !json.contains("hint")) {
		AppMsg msg = AppMsg.makeText(this, "���ҳ�룬ҳ����ת������...", AppMsg.STYLE_INFO);
		msg.show();
	}
}
 
开发者ID:nihaoyalong,项目名称:zen4android,代码行数:8,代码来源:ZenContentActivity.java

示例8: validateNumber

import com.devspark.appmsg.AppMsg; //导入方法依赖的package包/类
private void validateNumber(View view, DocumentType documentType) {
    String number = Functions.getCleanText(mEditText.getText().toString());
    if (!Functions.isDocumentNumberReady(number)) {
        setErrorMessage(getString(R.string.error_doc_invalid));
        return;
    }

    AppMsg appMsg = null;
    AppMsg.cancelAll(this);
    AppMsg.Style style = new AppMsg.Style(AppMsg.LENGTH_SHORT, R.color.green_stuff);
    String errorMessage = null;
    switch (documentType) {
        case BI:
            if (ValidatorHelper.isNifOrBiValid(number)) {
                appMsg = AppMsg.makeText(MainActivity.this, getString(R.string.valid_bi), style);
            } else {
                errorMessage = getString(R.string.error_bi);
            }
            break;
        case NIF:
            if (ValidatorHelper.isNifOrBiValid(number)) {
                appMsg = AppMsg.makeText(MainActivity.this, getString(R.string.valid_nif), style);
            } else {
                errorMessage = getString(R.string.error_nif);
            }
            break;
        case CC:
            if (ValidatorHelper.isCcValid(number)) {
                appMsg = AppMsg.makeText(MainActivity.this, getString(R.string.valid_cc), style);
            } else {
                errorMessage = getString(R.string.error_cc);
            }
            break;
        case NISS:
            if (ValidatorHelper.isNissValid(number)) {
                appMsg = AppMsg.makeText(MainActivity.this, getString(R.string.valid_niss), style);
            } else {
                errorMessage = getString(R.string.error_niss);
            }
            break;
        default:
    }

    if (appMsg != null) {
        appMsg.getView().setOnClickListener(new CancelAppMsg(appMsg));
        appMsg.setLayoutGravity(Gravity.BOTTOM);
        appMsg.show();
    }

    invalidateViews((BetterButton) view, errorMessage);
}
 
开发者ID:JoaquimLey,项目名称:validate-android,代码行数:52,代码来源:MainActivity.java

示例9: onCreate

import com.devspark.appmsg.AppMsg; //导入方法依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setSupportProgressBarIndeterminate(true);
//        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
        setContentView(R.layout.activity_main);
        context = this;
        Global.setContext(context);
        mNavigationDrawerFragment = (NavigationDrawerFragment)
                getFragmentManager().findFragmentById(R.id.navigation_drawer);
        mTitle = getTitle();

        // Set up the drawer.
        mNavigationDrawerFragment.setUp(
                R.id.navigation_drawer,
                (DrawerLayout) findViewById(R.id.drawer_layout));

        if(!Global.userIsConnected()) onDisconnect();

        // Volume
        final View view = getLayoutInflater().inflate(R.layout.volume_action_view, null);
        if(view != null) {
            mVolumeControls = (SeekBar) view.findViewById(R.id.volume_control);
            if (mVolumeControls != null) {
                mVolumeControls.setMax(100);
                mVolumeControls.setOnSeekBarChangeListener(this);
            } else {
                Toast.makeText(this, "Error findViewById for volume action view", Toast.LENGTH_SHORT).show();
            }
            // Apply the custom View to the ActionBar
            getSupportActionBar().setCustomView(view, new ActionBar.LayoutParams(
                    ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
        }

        ConnectivityManager connManager = (ConnectivityManager) Global.getStaticContext().getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
        if (mWifi != null && !mWifi.isConnected()) {
            AppMsg.Style style = new AppMsg.Style(AppMsg.LENGTH_STICKY, R.color.alert_wifi);
            AppMsg provided = AppMsg.makeText(this, R.string.wifi_error, style);
            provided.getView()
                    .setOnClickListener(new CancelAppMsg(provided));
            provided.show();
        }
    }
 
开发者ID:lheido,项目名称:TuxRemote,代码行数:45,代码来源:MainActivity.java


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