本文整理匯總了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);
}