當前位置: 首頁>>代碼示例>>Java>>正文


Java LibsBuilder類代碼示例

本文整理匯總了Java中com.mikepenz.aboutlibraries.LibsBuilder的典型用法代碼示例。如果您正苦於以下問題:Java LibsBuilder類的具體用法?Java LibsBuilder怎麽用?Java LibsBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LibsBuilder類屬於com.mikepenz.aboutlibraries包,在下文中一共展示了LibsBuilder類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onOptionsItemSelected

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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.LibsBuilder; //導入依賴的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.LibsBuilder; //導入依賴的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.LibsBuilder; //導入依賴的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.LibsBuilder; //導入依賴的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.LibsBuilder; //導入依賴的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: onCreate

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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

示例8: onOptionsItemSelected

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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

示例9: onCreate

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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

示例10: onOptionsItemSelected

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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

示例11: onPreferenceSettingsChanged

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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

示例12: onOptionsItemSelected

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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

示例13: onCreate

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    setupActionBar();

    LibsFragment fragment = new LibsBuilder()
            .withLicenseShown(true)
            .withAboutIconShown(true)
            .withAboutAppName(getString(R.string.app_name))
            .withVersionShown(true)
            .withAboutVersionString(BuildConfig.VERSION_NAME + "." + BuildConfig.VERSION_CODE)
            .withAboutDescription(getString(R.string.app_about_description))
            .fragment();

    FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
    fragmentTransaction.add(R.id.about_frame_layout, fragment);
    fragmentTransaction.commit();
}
 
開發者ID:wcomartin,項目名稱:PlexPy-Remote,代碼行數:20,代碼來源:AboutActivity.java

示例14: onCreate

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的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

示例15: getItem

import com.mikepenz.aboutlibraries.LibsBuilder; //導入依賴的package包/類
@Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0:
                return AboutFragment.newInstance(position);
            case 1:
//                    return AboutChangelogFragment.newInstance(position);
                return WebChangelogFragment.newInstance();
            case 2:
                return AboutCreditsFragment.newInstance(position);
            case 3:
                return new LibsBuilder().supportFragment();
            default:
                return null;
        }
    }
 
開發者ID:moneymanagerex,項目名稱:android-money-manager-ex,代碼行數:17,代碼來源:AboutTabAdapter.java


注:本文中的com.mikepenz.aboutlibraries.LibsBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。