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


Java FakeActivity类代码示例

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


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

示例1: ChooseForum

import com.mob.tools.FakeActivity; //导入依赖的package包/类
@Override
protected void ChooseForum() {
	Theme1PageSelectForum selectforum = new Theme1PageSelectForum();
	selectforum.showForResult(getContext(), new FakeActivity() {
		public void onResult(HashMap<String, Object> data) {
			if (data != null) {
				ForumForum forumForum = ResHelper.forceCast(data.get("ForumForum"));
				if (forumForum != null) {
					if (forumForum.fid < 1) {
						textViewChooseCat.setText(getStringRes("bbs_pagewritethread_choose_category"));
					} else {
						selectedForum = forumForum;
						textViewChooseCat.setText(selectedForum.name);
					}
				}
				OnForumChoosed(forumForum);
			}
		}
	});
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:21,代码来源:Theme1PageWriteThread.java

示例2: checkIsAllowToReply

import com.mob.tools.FakeActivity; //导入依赖的package包/类
private boolean checkIsAllowToReply(boolean gotoLogin, boolean toast) {
	User user = BBSViewBuilder.getInstance().ensureLogin(false);
	boolean isLogin = (user != null);
	if (isLogin) {
		if (user.allowReply == 1) {
			return true;
		} else if (toast){//不允许发帖
			ToastUtils.showToast(getContext(),
					getResources().getString(ResHelper.getStringRes(getContext(), "bbs_dont_allowreply")));
			return false;
		}
	} else if (gotoLogin) {
		PageLogin pagelogin = BBSViewBuilder.getInstance().buildPageLogin();
		pagelogin.showForResult(getContext(), new FakeActivity() {
			public void onResult(HashMap<String, Object> data) {
				super.onResult(data);
			}
		});
	}
	return false;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:22,代码来源:ForumThreadDetailView.java

示例3: ChooseForum

import com.mob.tools.FakeActivity; //导入依赖的package包/类
protected void ChooseForum() {
	PageSelectForum selectforum = BBSViewBuilder.getInstance().buildPageSelectForum();
	selectforum.showForResult(getContext(), new FakeActivity() {
		public void onResult(HashMap<String, Object> data) {
			if (data != null) {
				ForumForum forumForum = ResHelper.forceCast(data.get("ForumForum"));
				if (forumForum != null) {
					if (forumForum.fid < 1) {
						textViewChooseCat.setText(getStringRes("bbs_pagewritethread_choose_category"));
					} else {
						selectedForum = forumForum;
						textViewChooseCat.setText(selectedForum.name);
					}
				}
				OnForumChoosed(forumForum);
			}
		}
	});
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:20,代码来源:PageWriteThread.java

示例4: onTitleRightClick

import com.mob.tools.FakeActivity; //导入依赖的package包/类
@Override
protected void onTitleRightClick(TitleBar titleBar) {
	super.onTitleRightClick(titleBar);
	if (userInfo == null) {
		return;
	}
	PageInitProfile editprofile = BBSViewBuilder.getInstance().buildPageEditProfile();
	editprofile.initPage(userInfo);
	editprofile.showForResult(getContext(), new FakeActivity() {
		public void onResult(HashMap<String, Object> data) {
			super.onResult(data);
			if (data != null) {
				User user = ResHelper.forceCast(data.get("user"));
				if (user != null) {
					userInfo = user;
					updateUserInfo();
				}
			}
		}
	});
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:22,代码来源:PageUserProfile.java

示例5: showLogin

import com.mob.tools.FakeActivity; //导入依赖的package包/类
public static void showLogin(final Context context, final LoginListener listener) {
	PageLogin pagelogin = BBSViewBuilder.getInstance().buildPageLogin();
	pagelogin.showForResult(context, new FakeActivity() {
		@Override
		public void onResult(HashMap<String, Object> data) {
			super.onResult(data);
			if (data != null) {
				Boolean login = (Boolean) data.get(PageResult.RESULT_LOGINSUCCESS_BOOLEAN);
				if (login != null && listener != null) {
					if (login) {
						listener.OnLoggedIn();
					} else {
						listener.OnCancel();
					}
				}
			}
		}
	});
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:20,代码来源:GUIManager.java

示例6: showEditPage

import com.mob.tools.FakeActivity; //导入依赖的package包/类
protected void showEditPage(Context context, List<Platform> platforms) {
    try {
        EditPageFakeActivity editPageFakeActivity = (EditPageFakeActivity) Class.forName(getClass().getPackage().getName() + ".EditPage").newInstance();
        editPageFakeActivity.setBackgroundView(this.backgroundView);
        editPageFakeActivity.setShareData(this.shareParamsMap);
        editPageFakeActivity.setPlatforms(platforms);
        if (this.dialogMode) {
            editPageFakeActivity.setDialogMode();
        }
        editPageFakeActivity.showForResult(context, null, new FakeActivity() {
            public void onResult(HashMap<String, Object> data) {
                if (data != null && data.containsKey("editRes")) {
                    PlatformListFakeActivity.this.themeShareCallback.doShare((HashMap) data.get("editRes"));
                }
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:21,代码来源:PlatformListFakeActivity.java

示例7: showEditPage

import com.mob.tools.FakeActivity; //导入依赖的package包/类
protected void showEditPage(Context context, List<Platform> platforms) {
	EditPageFakeActivity editPageFakeActivity;
	String editPageClass = ((Object)this).getClass().getPackage().getName()+".EditPage";
	try {
		editPageFakeActivity = (EditPageFakeActivity) Class.forName(editPageClass).newInstance();
	} catch (Exception e) {
		e.printStackTrace();
		return;
	}

	editPageFakeActivity.setBackgroundView(backgroundView);
	editPageFakeActivity.setShareData(shareParamsMap);
	editPageFakeActivity.setPlatforms(platforms);
	if (dialogMode) {
		editPageFakeActivity.setDialogMode();
	}
	editPageFakeActivity.showForResult(context, null, new FakeActivity() {
		public void onResult(HashMap<String, Object> data) {
			if(data == null)
				return;
			if (data.containsKey("editRes")) {
				@SuppressWarnings("unchecked")
				HashMap<Platform, HashMap<String, Object>> editRes
						= (HashMap<Platform, HashMap<String, Object>>) data.get("editRes");
				themeShareCallback.doShare(editRes);
			}
		}
	});
}
 
开发者ID:liupengandroid,项目名称:ywApplication,代码行数:30,代码来源:PlatformListFakeActivity.java

示例8: checkLogin

import com.mob.tools.FakeActivity; //导入依赖的package包/类
private boolean checkLogin(boolean gotoLogin) {
	UserAPI api = BBSSDK.getApi(UserAPI.class);
	User user;
	try {
		user = api.getCurrentUser();
	} catch (Exception e) {
		user = null;
	}
	boolean isLogin = (user != null);
	if (isLogin) {
		return true;
	} else if (gotoLogin) {
		PageLogin pagelogin = BBSViewBuilder.getInstance().buildPageLogin();
		pagelogin.showForResult(getContext(), new FakeActivity() {
			public void onResult(HashMap<String, Object> data) {
				super.onResult(data);
				if (data != null) {
					Boolean refresh = (Boolean) data.get(PageResult.RESULT_LOGINSUCCESS_BOOLEAN);
					if (refresh != null && refresh && forumThreadView != null) {
						forumThreadView.loadData();
					}
				}
			}
		});
	}
	return false;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:28,代码来源:PageForumThread.java

示例9: showEditPage

import com.mob.tools.FakeActivity; //导入依赖的package包/类
protected void showEditPage(Context context, List<Platform> platforms) {
	// 编辑分享内容的统计
	ShareSDK.logDemoEvent(3, null);

	EditPageFakeActivity editPageFakeActivity;
	String editPageClass = ((Object)this).getClass().getPackage().getName()+".EditPage";
	try {
		editPageFakeActivity = (EditPageFakeActivity) Class.forName(editPageClass).newInstance();
	} catch (Exception e) {
		e.printStackTrace();
		return;
	}

	editPageFakeActivity.setBackgroundView(backgroundView);
	editPageFakeActivity.setShareData(shareParamsMap);
	editPageFakeActivity.setPlatforms(platforms);
	if (dialogMode) {
		editPageFakeActivity.setDialogMode();
	}
	editPageFakeActivity.showForResult(context, null, new FakeActivity() {
		public void onResult(HashMap<String, Object> data) {
			if(data == null)
				return;
			if (data.containsKey("editRes")) {
				@SuppressWarnings("unchecked")
				HashMap<Platform, HashMap<String, Object>> editRes
						= (HashMap<Platform, HashMap<String, Object>>) data.get("editRes");
				themeShareCallback.doShare(editRes);
			}
		}
	});
}
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:33,代码来源:PlatformListFakeActivity.java

示例10: setListenerAndShow

import com.mob.tools.FakeActivity; //导入依赖的package包/类
private void setListenerAndShow(final boolean cameraType, final OnImageGotListener listener) {
		boolean permissionGranted = false;
		try {
			permissionGranted = DeviceHelper.getInstance(MobSDK.getContext()).checkPermission(
					"android.permission.WRITE_EXTERNAL_STORAGE");
		} catch (Throwable t) {
//			t.printStackTrace();
		}

		final Runnable rGranted = new Runnable() {
			public void run() {
				PhotoCropPage.this.cameraType = cameraType;
				showForResult(MobSDK.getContext(), null, new FakeActivity() {
					public void onResult(HashMap<String, Object> data) {
						if (listener != null && data != null) {
							String photoId = (String) data.get("id");
							Object urls = data.get("avatar");
							if (urls != null && urls instanceof ArrayList) {
								@SuppressWarnings("unchecked")
								ArrayList<String> list = (ArrayList<String>) urls;
								String[] photoUrl = list.toArray(new String[list.size()]);
								listener.onOmageGot(photoId, photoUrl);
							}
						}
					}
				});
			}
		};

		if (permissionGranted) {
			rGranted.run();
		} else if (Build.VERSION.SDK_INT >= 23) {
			FakeActivity page = new FakeActivity() {
				public void onCreate() {
					requestPermissions(new String[]{
							"android.permission.WRITE_EXTERNAL_STORAGE"
					}, 1);
				}

				public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
					if (grantResults != null && grantResults.length >= 1 && grantResults[0] != -1) {
						rGranted.run();
					}
					finish();
				}
			};
			page.show(MobSDK.getContext(), null);
		}
	}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:50,代码来源:PhotoCropPage.java

示例11: showForResult

import com.mob.tools.FakeActivity; //导入依赖的package包/类
public void showForResult(Context context, FakeActivity resultReceiver) {
	super.showForResult(context, null, resultReceiver);
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:4,代码来源:BasePage.java


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