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


Java Libs类代码示例

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


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

示例1: onOptionsItemSelected

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.action_info:
            new LibsBuilder()
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    .withAboutIconShown(true)
                    .withAboutAppName(getString(R.string.app_name))
                    .withAboutVersionShown(true)
                    .withAboutDescription(getString(R.string.app_desc))
                    .withLicenseDialog(true)
                    .withLicenseShown(true)
                    .start(this);
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
 
开发者ID:tran-khoa,项目名称:ANNO1404-Warenrechner-App,代码行数:19,代码来源:MainActivity.java

示例2: onCreate

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_fragment);

    LibsFragment fragment = new LibsBuilder()
            .withFields(R.string.class.getFields())
            .withLibraries("picasso", "androidbootstrap", "snackbar", "aboutlibraries")
            .withVersionShown(false)
            .withLicenseShown(false)
            .withLibraryModification("aboutlibraries", Libs.LibraryFields.LIBRARY_NAME, "_AboutLibraries")
            .fragment();

    FragmentManager fragmentManager = getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.frame_container, fragment).commit();

    findViewById(R.id.game_card).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent i = new Intent(Intent.ACTION_VIEW);
            i.setData(Uri.parse("http://pigdroid.bogspot.com"));
            startActivity(i);
        }
    });

}
 
开发者ID:eduyayo,项目名称:gamesboard,代码行数:27,代码来源:AboutActivity.java

示例3: onCreate

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	
	Intent intent = new LibsBuilder()
		.withActivityTitle(getString(R.string.activity_about_title))
		.withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
		.withFields(R.string.class.getFields())
		.withAutoDetect(true)
		.withLibraries("acra", "commonsio")
		.withListener(buttonListener)
		.intent(this);

	setIntent(intent);

	super.onCreate(savedInstanceState);
}
 
开发者ID:cemrich,项目名称:zapp,代码行数:17,代码来源:AboutActivity.java

示例4: onOptionsItemSelected

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();
    if (id == R.id.about_icon) {
        new LibsBuilder()
                .withFields(R.string.class.getFields())
                .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                .withActivityTitle(getApplication().getString(R.string.title_about))
                .withLicenseShown(true)
                .withAboutIconShown(true)
                .withAboutVersionShown(true)
                .withAboutDescription("This is demo app displaying the features of <b>ZXing-Orient</b> library.")
                .start(this);
        return true;
    }

    return super.onOptionsItemSelected(item);
}
 
开发者ID:SudarAbisheck,项目名称:ZXing-Orient,代码行数:19,代码来源:MainActivity.java

示例5: onOptionsItemSelected

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    Intent i;

    switch (item.getItemId()) {
        case R.id.action_about:
            new LibsBuilder()
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    .withActivityTitle(getString(R.string.action_about))
                    .withAboutAppName(getString(R.string.app_name))
                    .withAboutDescription(getString(R.string.app_description))
                    .withAboutIconShown(true)
                    .withAboutVersionShown(true)
                    .withLicenseShown(true)
                    .withVersionShown(true)
                    .start(this);
            return true;

        default:
            return super.onOptionsItemSelected(item);
    }
}
 
开发者ID:Anasthase,项目名称:AndroidSeekBarPreference,代码行数:23,代码来源:SettingsActivity.java

示例6: onOptionsItemSelected

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.me_main_about:
            new LibsBuilder()
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    .start(this);
            return true;
        case R.id.me_main_change_team:
            presenter.leaveScope();
            sessionManager.changeTeam();
            ChooseTeamActivity.launch(this);
            finish();
            return true;
        case R.id.me_main_log_out:
            presenter.leaveScope();
            sessionManager.logOut();
            LoginActivity.launch(this);
            finish();
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
 
开发者ID:grundleborg,项目名称:matterdroid,代码行数:25,代码来源:MainActivity.java

示例7: onOptionsItemSelected

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case android.R.id.home:
            onBackPressed();
            break;
        case R.id.action_settings:
            startActivity(new Intent(this, MaoniSampleSettingsActivity.class));
            break;
        case R.id.action_about:
            new LibsBuilder()
                    //Pass the fields of your application to the lib so it can find all external lib information
                    .withFields(R.string.class.getFields())
                    .withActivityTitle(getString(R.string.action_about))
                    //provide a style (optional) (LIGHT, DARK, LIGHT_DARK_TOOLBAR)
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    //start the activity
                    .start(this);
            break;
        default:
            break;
    }
    return super.onOptionsItemSelected(item);
}
 
开发者ID:rm3l,项目名称:maoni,代码行数:25,代码来源:MaoniSampleMainActivity.java

示例8: onCreate

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    setIntent(new LibsBuilder()
            .withActivityTitle(getResources().getString(R.string.nav_about))
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withAboutAppName(getResources().getString(R.string.app_name))
            .withAboutDescription("http://chenyuanming.cn @KeepCoding")
            .withAboutVersionShown(true)
            .withAboutIconShown(true)
            .withAboutVersionShownCode(true)
            .withAboutVersionShownName(true)
            .withLicenseShown(true)
            .intent(this));

    super.onCreate(savedInstanceState);
}
 
开发者ID:overlooping,项目名称:GankMeizhi,代码行数:17,代码来源:AboutActivity.java

示例9: onOptionsItemSelected

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.action_about:
            new LibsBuilder()
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    .withActivityTitle(getResources().getString(R.string.action_about))
                    .withAboutIconShown(true)
                    .withAboutDescription(getResources().getString(R.string.app_description))
                    .withAboutVersionShown(true)
                    .withAboutAppName(getResources().getString(R.string.app_name))
                    .withAutoDetect(true)
                    .withLicenseShown(true)
                    .start(this);
            return true;

    }
    return super.onOptionsItemSelected(item);
}
 
开发者ID:javiersantos,项目名称:MaterialStyledDialogs,代码行数:20,代码来源:MainActivity.java

示例10: onPreferenceSettingsChanged

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
/**
 * callback for preference changes
 *
 * @param sharedPreferences
 * @param name
 */
@Override
public void onPreferenceSettingsChanged(SharedPreferences sharedPreferences, String name) {
    if (name.equals("libraries")) {
        new LibsBuilder()
                .withAboutAppName("Magis")
                .withLicenseShown(true)
                .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                .withActivityTitle("Over")
                .start(this);
        configUtil.removePreferencesValue(name);
    } else if (name.equals("website")) {
        Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.magis-app.nl"));
        startActivity(browserIntent);
        configUtil.removePreferencesValue(name);
    } else {
        Toast.makeText(this, R.string.msg_restart_to_apply, Toast.LENGTH_SHORT).show();
    }
}
 
开发者ID:Z3r0byte,项目名称:Magis,代码行数:25,代码来源:SettingsActivity.java

示例11: onOptionsItemSelected

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {

    switch (item.getItemId()) {
        case R.id.action_about:

            new LibsBuilder()
                    .withFields(R.string.class.getFields())
                    .withAutoDetect(true)
                    .withAboutIconShown(true)
                    .withAboutVersionShownName(true)
                    .withAboutAppName("Faker")
                    .withAboutDescription("Provides fake data to your Android apps.")
                    .withActivityTitle("About")
                    .withActivityTheme(R.style.AppTheme)
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    .start(this);
            return true;
    }

    return super.onOptionsItemSelected(item);
}
 
开发者ID:thiagokimo,项目名称:Faker,代码行数:23,代码来源:MainActivity.java

示例12: li

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
public void li(View view)
{
    new LibsBuilder()
            //provide a style (optional) (LIGHT, DARK, LIGHT_DARK_TOOLBAR)
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withAboutAppName("COEP Moodle")
            .withAboutIconShown(true)
            .withAboutVersionShown(true)
            .withAboutDescription(getString(R.string.about))
            //start the activity
            .start(this);
}
 
开发者ID:ashutoshbsathe,项目名称:COEP-Moodle-via-Webview,代码行数:13,代码来源:About.java

示例13: handleSelect

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
private void handleSelect(int itemId, int position, boolean fromUser) {
    Logger.getInstance().Information(TAG, String.format(Locale.getDefault(), "handleSelect: itemId: %d, position: %d, fromUser: %s", itemId, position, fromUser));
    if (fromUser) {
        NavigationService.NavigationResult navigationResult = NavigationService.NavigationResult.NULL;

        switch (itemId) {
            case R.id.bottomNavigationBixby:
                navigationResult = NavigationService.getInstance().NavigateToActivity(MainActivity.this, BixbyActivity.class);
                break;
            case R.id.bottomNavigationSettings:
                navigationResult = NavigationService.getInstance().NavigateToActivity(MainActivity.this, SettingsActivity.class);
                break;
            case R.id.bottomNavigationDetails:
                new LibsBuilder()
                        .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                        .start(MainActivity.this);
                navigationResult = NavigationService.NavigationResult.SUCCESS;
                break;
            default:
                break;
        }

        if (navigationResult != NavigationService.NavigationResult.SUCCESS) {
            Logger.getInstance().Error(TAG, String.format(Locale.getDefault(), "Navigation failed! navigationResult is %s!", navigationResult));
            displayErrorSnackBar("Failed to navigate! Please contact LucaHome support!");
        }
    }
}
 
开发者ID:GuepardoApps,项目名称:LucaHome-AndroidApplication,代码行数:29,代码来源:MainActivity.java

示例14: navigateToAbout

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@OnClick(R.id.iconAbout)
void navigateToAbout() {
    Answers.getInstance().logCustom(new CustomEvent("About"));

    new LibsBuilder()
            .withAutoDetect(true)
            .withLicenseShown(true)
            .withVersionShown(true)
            .withListener(libsListener)
            .withActivityTitle("Open Source")
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .start(this);
}
 
开发者ID:BackPackerDz,项目名称:PotRoom,代码行数:14,代码来源:ListRoomsActivity.java

示例15: onExtraClicked

import com.mikepenz.aboutlibraries.Libs; //导入依赖的package包/类
@DebugLog
@Override
public boolean onExtraClicked(View v, Libs.SpecialButton specialButton) {

    if (specialButton.equals(Libs.SpecialButton.SPECIAL1)) {
        navigateToGitHub();
    }
    else if (specialButton.equals(Libs.SpecialButton.SPECIAL2)) {
        navigateToPlayStore();
    }

    return false;
}
 
开发者ID:BackPackerDz,项目名称:PotRoom,代码行数:14,代码来源:ListRoomsActivity.java


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