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


Java IntentUtil类代码示例

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


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

示例1: onPostExecute

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
protected void onPostExecute(Boolean result) {
    // TODO Auto-generated method stub
    super.onPostExecute(result);
    mAlertDialog.dismiss();
    if (result) {
        showLongToast("登录成功");
        Editor edit = share.edit();
        edit.putString(UserLoginUidActivity.KEY, editKey.getText()
                .toString());
        edit.commit();
        IntentUtil.start_activity(UserLoginActivity.this,
                UserCenterActivity.class);
        finish();
    } else {
        showLongToast(getResources().getString(
                R.string.user_loginKey_error));
    }
}
 
开发者ID:shengge,项目名称:eoe-android-app,代码行数:20,代码来源:UserLoginActivity.java

示例2: onClick

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
public void onClick(View v) {
	// TODO Auto-generated method stub
	switch (v.getId()) {
	case R.id.button_user_login:
		checkUsername(editUserID.getText().toString(), editPwd.getText()
				.toString());
		break;
	case R.id.Linear_above_toHome:
		if (share.contains(UserLoginUidActivity.KEY)
				&& !share.getString(UserLoginUidActivity.KEY, "")
						.equals("")) {
			IntentUtil.start_activity(this, UserCenterActivity.class);
			finish();
		} else {
			showLongToast(getResources().getString(
					R.string.user_center_error));
		}
		break;
	}
}
 
开发者ID:shengge,项目名称:eoe-android-app,代码行数:22,代码来源:UserLoginUidActivity.java

示例3: onPostExecute

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
protected void onPostExecute(Boolean result) {
	// TODO Auto-generated method stub
	super.onPostExecute(result);
	mAlertDialog.dismiss();
	if (result) {
		showLongToast("登录成功");
		Editor edit = share.edit();
		edit.putString(UID, editUserID.getText().toString());
		edit.putString(PWD, editPwd.getText().toString());
		edit.putString(KEY, key);
		edit.commit();
		IntentUtil.start_activity(UserLoginUidActivity.this, UserCenterActivity.class);
		finish();
	} else {
		showLongToast(getResources().getString(
				R.string.user_login_error));
		editUserID.setText("");
		editPwd.setText("");
	}
}
 
开发者ID:shengge,项目名称:eoe-android-app,代码行数:22,代码来源:UserLoginUidActivity.java

示例4: startDetailActivity

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
public void startDetailActivity(Activity mContext, String url,
		String title, String shareTitle) {
	IntentUtil.start_activity(mContext, DetailsActivity.class,
			new BasicNameValuePair("url", url), new BasicNameValuePair(
					"title", title), new BasicNameValuePair("sharetitle",
					shareTitle));
}
 
开发者ID:shengge,项目名称:eoe-android-app,代码行数:8,代码来源:BaseListFragment.java

示例5: onClick

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
public void onClick(View v) {
    // TODO Auto-generated method stub
    switch (v.getId()) {
        case R.id.edittext_user_key:
            break;
        case R.id.imageview_user_title:

            break;
        case R.id.Linear_above_toHome:
            if (share.contains(UserLoginUidActivity.KEY)
                    && !share.getString(UserLoginUidActivity.KEY, "")
                            .equals("")) {
                IntentUtil.start_activity(this, UserCenterActivity.class);
                finish();
            } else {
                showLongToast(getResources().getString(
                        R.string.user_center_error));
            }
            break;
        case R.id.login_button_another:
            IntentUtil.start_activity(this, UserLoginUidActivity.class);
            finish();
            break;
        case R.id.user_login_bind:
        	loginBind();
            break;
        case R.id.scan_user_key:
            startActivityForResult(new Intent(this, CaptureActivity.class), GET_CODE);
            break;
    }
}
 
开发者ID:shengge,项目名称:eoe-android-app,代码行数:33,代码来源:UserLoginActivity.java

示例6: onClick

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
public void onClick(View v) {
	// TODO Auto-generated method stub
	if (responseEntity == null)
		return;
	if (mKey.equals(null) || mKey.equals("")) {
		showLongToast(getResources().getString(R.string.user_login_prompt));
		return;
	}
	String url = null;
	switch (v.getId()) {
	case R.id.rlGood:
		url = updateUrl(IsGood, responseEntity.getBar().getUserlike()
				.getGood());
		break;
	case R.id.rlBed:
		url = updateUrl(IsBed, responseEntity.getBar().getUserlike()
				.getBad());
		break;
	case R.id.rlCollect:
		url = updateUrl(IsCollect, responseEntity.getBar().getFavorite());
		break;
	case R.id.rlShare:
		recommandToYourFriend(shareUrl, shareTitle);
		break;
	case R.id.rlDiscuss:
		IntentUtil.start_activity(DetailsActivity.this,
				DetailsDiscussActivity.class, new BasicNameValuePair(
						"discuss_list", responseEntity.getBar()
								.getComment().getGet()),
				new BasicNameValuePair("discuss", responseEntity.getBar()
						.getComment().getSubmit()), new BasicNameValuePair(
						"title", mTitle));
		break;
	}
	if (url != null) {
		new LoginAsyncTask().execute(url, v.getId());
	}
}
 
开发者ID:RyanLee7,项目名称:eoe_android,代码行数:40,代码来源:DetailsActivity.java

示例7: onClick

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
public void onClick(View v) {
    if(v.getId()==R.id.bn_refresh)
    {
        new MyTask().execute();
        return;
    }
    if (responseEntity == null)
        return;
    if (mKey.equals(null) || mKey.equals("")) {
        showLongToast(getResources().getString(R.string.user_login_prompt));
        return;
    }
    String url = null;
    switch (v.getId()) {
        case R.id.rlGood:
            url = updateUrl(IsGood, responseEntity.getBar().getUserlike()
                    .getGood());
            break;
        case R.id.rlBed:
            url = updateUrl(IsBed, responseEntity.getBar().getUserlike()
                    .getBad());
            break;
        case R.id.rlCollect:
            url = updateUrl(IsCollect, responseEntity.getBar().getFavorite());
            break;
        case R.id.rlShare:
            recommandToYourFriend(shareUrl, shareTitle);
            break;
        case R.id.rlDiscuss:
            IntentUtil.start_activity(DetailsActivity.this,
                    DetailsDiscussActivity.class, new BasicNameValuePair(
                    "discuss_list", responseEntity.getBar()
                    .getComment().getGet()),
                    new BasicNameValuePair("discuss", responseEntity.getBar()
                            .getComment().getSubmit()), new BasicNameValuePair(
                    "title", mTitle));
            break;
    }
    if (url != null) {
        if (!NetWorkHelper.checkNetState(this)) {
            showLongToast(getResources().getString(R.string.httpisNull));
            return;
        }
        new LoginAsyncTask().execute(url, v.getId());
    }
}
 
开发者ID:shengge,项目名称:eoe-android-app,代码行数:48,代码来源:DetailsActivity.java

示例8: onClick

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
public void onClick(View v) {
    // TODO Auto-generated method stub
    switch (v.getId()) {
        case R.id.Linear_above_toHome:
            showMenu();
            break;
        case R.id.login_login:
            SharedPreferences share = this.getSharedPreferences(
                    UserLoginUidActivity.SharedName, Context.MODE_PRIVATE);
            // [start] 修复上一个bug
            String Key = share.getString(UserLoginUidActivity.KEY, "");
            if (Key != "" && !Key.contains(":")) {
                Editor edit = share.edit();
                edit.putString(UserLoginUidActivity.KEY, "");
                edit.commit();
            }
            // [end] 下一版本删除掉
            if (share.contains(UserLoginUidActivity.KEY)
                    && !share.getString(UserLoginUidActivity.KEY, "")
                    .equals("")) {
                IntentUtil.start_activity(this, UserCenterActivity.class);
            } else {
                IntentUtil.start_activity(this, UserLoginActivity.class);
            }
            break;
        case R.id.imageview_above_more:
            if (isShowPopupWindows) {
                new PopupWindowUtil(mViewPager).showActionWindow(v, this,
                        mBasePageAdapter.tabs);
            }
            break;
        case R.id.imageview_above_query:

            if (NetWorkHelper.isNetworkAvailable(MainActivity.this)) {
                IntentUtil.start_activity(this, SearchActivity.class,
                        new BasicNameValuePair("tag", current_page));
            } else {
                Toast.makeText(getApplicationContext(), "网络连接失败,请检查网络",
                        Toast.LENGTH_LONG).show();
            }
            break;
        case R.id.cbFeedback:
            FeedbackAgent agent = new FeedbackAgent(this);
            agent.startFeedbackActivity();
            break;
        case R.id.cbAbove:
            IntentUtil.start_activity(this, AboutActivity.class);
            break;
        case R.id.bn_refresh:
            switch (mTag) {
                case 0:
                    imgQuery.setVisibility(View.GONE);
                    new MyTask().execute(topDao);
                    break;
                case 1:
                    new MyTask().execute(newsDao);
                    break;
                case 2:
                    new MyTask().execute(wikiDao);
                    break;
                case 3:
                    new MyTask().execute(blogsDao);
                    break;
                default:
                    break;
            }
            break;
    }

}
 
开发者ID:shengge,项目名称:eoe-android-app,代码行数:72,代码来源:MainActivity.java

示例9: onClick

import cn.eoe.app.utils.IntentUtil; //导入依赖的package包/类
@Override
public void onClick(View v) {
	// TODO Auto-generated method stub
	switch (v.getId()) {
	case R.id.Linear_above_toHome:
		showMenu();
		break;
	case R.id.login_login:
		SharedPreferences share = this.getSharedPreferences(
				UserLoginUidActivity.SharedName, Context.MODE_PRIVATE);
		// [start] 修复上一个bug
		String Key = share.getString(UserLoginUidActivity.KEY, "");
		if (Key!="" && !Key.contains(":")) {
			Editor edit = share.edit();
			edit.putString(UserLoginUidActivity.KEY, "");
			edit.commit();
		}
		// [end] 下一版本删除掉
		if (share.contains(UserLoginUidActivity.KEY)
				&& !share.getString(UserLoginUidActivity.KEY, "")
						.equals("")) {
			IntentUtil.start_activity(this, UserCenterActivity.class);
		} else {
			IntentUtil.start_activity(this, UserLoginActivity.class);
		}
		break;
	case R.id.imageview_above_more:
		if (isShowPopupWindows) {
			new PopupWindowUtil(mViewPager).showActionWindow(v, this,
					mBasePageAdapter.tabs);
		}
		break;
	case R.id.imageview_above_query:

		if (NetWorkHelper.isNetworkAvailable(MainActivity.this)) {
			IntentUtil.start_activity(this, SearchActivity.class,
					new BasicNameValuePair("tag", current_page));
		} else {
			Toast.makeText(getApplicationContext(), "网络连接失败,请检查网络",
					Toast.LENGTH_LONG).show();
		}
		break;
	case R.id.cbFeedback:
		UMFeedbackService.openUmengFeedbackSDK(this);
		break;
	case R.id.cbAbove:
		IntentUtil.start_activity(this, AboutActivity.class);
		break;
	}

}
 
开发者ID:RyanLee7,项目名称:eoe_android,代码行数:52,代码来源:MainActivity.java


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