本文整理汇总了Java中android.support.v4.app.FragmentActivity.findViewById方法的典型用法代码示例。如果您正苦于以下问题:Java FragmentActivity.findViewById方法的具体用法?Java FragmentActivity.findViewById怎么用?Java FragmentActivity.findViewById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.app.FragmentActivity
的用法示例。
在下文中一共展示了FragmentActivity.findViewById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setProxy
import android.support.v4.app.FragmentActivity; //导入方法依赖的package包/类
public void setProxy(FragmentActivity proxyActivity, String jarname, String jar_packagename) {
JLog.i("clf", "setProxy..proxyActivity=" + proxyActivity + ",jarname=" + jarname + ",jar_packagename=" + jar_packagename);
this.proxyActivity = proxyActivity;
this.jarname = jarname;
this.jar_packagename = jar_packagename;
this.root = (ViewGroup) proxyActivity.findViewById(16908290);
JLog.i("clf", "setProxy..root=" + this.root);
setJarResource(true);
JLog.i("clf", "setProxy..1");
JLog.i("clf", "setProxy..getClassLoader()=" + getClassLoader());
this.context = new JarContext(proxyActivity, getClassLoader());
JLog.i("clf", "setProxy..context=" + this.context);
}
示例2: updateFab
import android.support.v4.app.FragmentActivity; //导入方法依赖的package包/类
/**
* Update FAB's look and action
*/
public static void updateFab(FragmentActivity activity, String fragmentTag, int selectionCount) {
FloatingActionButton fab = (FloatingActionButton) activity.findViewById(R.id.fab);
if (fab == null) {
return;
}
Fragment fragment = activity.getSupportFragmentManager().findFragmentByTag(fragmentTag);
if (fragment == null) {
fab.hide();
return;
}
/* Hide FAB if there are selected notes. */
if (selectionCount > 0) {
fab.hide();
return;
}
if (fragment instanceof Fab) {
final Runnable fabAction = ((Fab) fragment).getFabAction();
ActivityUtils.FragmentResources resources = new ActivityUtils.FragmentResources(activity, fragmentTag);
if (resources.fabDrawable != null && fabAction != null) {
fab.show();
fab.setBackgroundTintList(ColorStateList.valueOf(resources.actionColor));
fab.setImageDrawable(resources.fabDrawable);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
fabAction.run();
}
});
} else {
fab.hide();
}
} else {
fab.hide();
}
}
示例3: findView
import android.support.v4.app.FragmentActivity; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public static <T extends View> T findView(FragmentActivity activity, int id) {
return (T) activity.findViewById(id);
}