本文整理汇总了Java中com.mikepenz.aboutlibraries.ui.LibsSupportFragment类的典型用法代码示例。如果您正苦于以下问题:Java LibsSupportFragment类的具体用法?Java LibsSupportFragment怎么用?Java LibsSupportFragment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LibsSupportFragment类属于com.mikepenz.aboutlibraries.ui包,在下文中一共展示了LibsSupportFragment类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.mikepenz.aboutlibraries.ui.LibsSupportFragment; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ActionBar ab = getSupportActionBar();
if (ab != null) {
ab.setDisplayUseLogoEnabled(true);
ab.setTitle("");
ab.show();
}
//init and show about libraries :D
LibsSupportFragment fragment = new LibsBuilder().withFields(R.string.class.getFields()).withVersionShown(true).withLicenseShown(true).supportFragment();
FragmentManager fragmentManager = getSupportFragmentManager();
fragmentManager.beginTransaction().replace(R.id.frame_container, fragment).commit();
}
开发者ID:sathishmscict,项目名称:AndroidActionItemBadge,代码行数:18,代码来源:MainActivity.java
示例2: onCreate
import com.mikepenz.aboutlibraries.ui.LibsSupportFragment; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
applyColorTheme();
setContentView(R.layout.activity_settings_libs);
setupAppBar(R.id.toolbar, R.string.settings_about_libs, true, true);
LibsSupportFragment fragment = new LibsBuilder()
.supportFragment();
if (savedInstanceState == null) {
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.root_fragment, fragment)
.commit();
}
}
开发者ID:ccrama,项目名称:Slide,代码行数:17,代码来源:SettingsLibs.java
示例3: initUi
import com.mikepenz.aboutlibraries.ui.LibsSupportFragment; //导入依赖的package包/类
/**
* Initialize UI.
*/
private void initUi() {
// Set version text.
try {
PackageInfo pkgInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
version.setText(Minerva.get().getString(R.string.version_string, pkgInfo.versionName, pkgInfo.versionCode));
} catch (PackageManager.NameNotFoundException e) {
Timber.e(e, "Couldn't get our package information.");
}
// Fill in libraries.
LibsSupportFragment libsFrag = new LibsBuilder().supportFragment();
getSupportFragmentManager().beginTransaction().replace(R.id.about_libs, libsFrag).commit();
}
开发者ID:bkromhout,项目名称:Minerva,代码行数:17,代码来源:AboutActivity.java
注:本文中的com.mikepenz.aboutlibraries.ui.LibsSupportFragment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论