當前位置: 首頁>>代碼示例>>Java>>正文


Java PopupWindowUtil類代碼示例

本文整理匯總了Java中cn.eoe.app.utils.PopupWindowUtil的典型用法代碼示例。如果您正苦於以下問題:Java PopupWindowUtil類的具體用法?Java PopupWindowUtil怎麽用?Java PopupWindowUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PopupWindowUtil類屬於cn.eoe.app.utils包,在下文中一共展示了PopupWindowUtil類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onClick

import cn.eoe.app.utils.PopupWindowUtil; //導入依賴的package包/類
@Override
public void onClick(View v) {
	// TODO Auto-generated method stub
	switch (v.getId()) {
	case R.id.imageview_user_title:
		new PopupWindowUtil(mViewPager).showActionWindow(v,
				UserCenterActivity.this, mTabsAdapter.tabs);
		break;
	}
}
 
開發者ID:shengge,項目名稱:eoe-android-app,代碼行數:11,代碼來源:UserCenterActivity.java

示例2: onClick

import cn.eoe.app.utils.PopupWindowUtil; //導入依賴的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

示例3: onClick

import cn.eoe.app.utils.PopupWindowUtil; //導入依賴的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.PopupWindowUtil類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。