Java Code Examples for com.mikepenz.aboutlibraries.LibsBuilder

The following are top voted examples for showing how to use com.mikepenz.aboutlibraries.LibsBuilder. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: ANNO1404-Warenrechner-App   File: MainActivity.java   View source code 6 votes vote down vote up
@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);
    }
}
 
Example 2
Project: gamesboard   File: AboutActivity.java   View source code 6 votes vote down vote up
@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);
        }
    });

}
 
Example 3
Project: zapp   File: AboutActivity.java   View source code 6 votes vote down vote up
@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);
}
 
Example 4
Project: ZXing-Orient   File: MainActivity.java   View source code 6 votes vote down vote up
@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);
}
 
Example 5
Project: AndroidSeekBarPreference   File: SettingsActivity.java   View source code 6 votes vote down vote up
@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);
    }
}
 
Example 6
Project: matterdroid   File: MainActivity.java   View source code 6 votes vote down vote up
@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);
    }
}
 
Example 7
Project: AndroidActionItemBadge   File: MainActivity.java   View source code 6 votes vote down vote up
@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();
}
 
Example 8
Project: maoni   File: MaoniSampleMainActivity.java   View source code 6 votes vote down vote up
@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);
}
 
Example 9
Project: GankMeizhi   File: AboutActivity.java   View source code 6 votes vote down vote up
@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);
}
 
Example 10
Project: MaterialStyledDialogs   File: MainActivity.java   View source code 6 votes vote down vote up
@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);
}
 
Example 11
Project: Magis   File: SettingsActivity.java   View source code 6 votes vote down vote up
/**
 * 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();
    }
}
 
Example 12
Project: Faker   File: MainActivity.java   View source code 6 votes vote down vote up
@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);
}
 
Example 13
Project: PlexPy-Remote   File: AboutActivity.java   View source code 6 votes vote down vote up
@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();
}
 
Example 14
Project: Slide   File: SettingsLibs.java   View source code 6 votes vote down vote up
@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();
    }
}
 
Example 15
Project: android-money-manager-ex   File: AboutTabAdapter.java   View source code 6 votes vote down vote up
@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;
        }
    }
 
Example 16
Project: calendula   File: AboutActivity.java   View source code 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    setupToolbar(getString(R.string.title_about), getResources().getColor(R.color.dark_grey_home));
    setupStatusBar(getResources().getColor(R.color.dark_grey_home));

    if (savedInstanceState == null) {

        Fragment fragment = new LibsBuilder()
                .withAboutAppName(getString(R.string.app_name))
                .withAboutIconShown(true)
                .withAboutVersionShown(true)
                .withLicenseShown(true)
                .withLicenseDialog(true)
                .withAboutDescription(getString(R.string.about_description))
                .fragment();

        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        ft.add(R.id.fragment_holder, fragment).commit();
    }
}
 
Example 17
Project: COEP-Moodle-via-Webview   File: About.java   View source code 5 votes vote down vote up
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);
}
 
Example 18
Project: LucaHome-AndroidApplication   File: MainActivity.java   View source code 5 votes vote down vote up
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!");
        }
    }
}
 
Example 19
Project: iroha-demo-android   File: MainActivity.java   View source code 5 votes vote down vote up
private void initFragments(Bundle savedInstanceState) {
    final FragmentManager manager = getSupportFragmentManager();
    assetReceiveFragment = (AssetReceiveFragment) manager.findFragmentByTag(AssetReceiveFragment.TAG);
    walletFragment = (WalletFragment) manager.findFragmentByTag(WalletFragment.TAG);
    assetSenderFragment = (AssetSenderFragment) manager.findFragmentByTag(AssetSenderFragment.TAG);

    if (assetReceiveFragment == null) {
        assetReceiveFragment = AssetReceiveFragment.newInstance(uuid);
    }
    if (walletFragment == null) {
        walletFragment = WalletFragment.newInstance(uuid);
    }
    if (assetSenderFragment == null) {
        assetSenderFragment = AssetSenderFragment.newInstance();
    }
    if (libsFragment == null) {
        libsFragment = new LibsBuilder()
                .withAboutIconShown(true)
                .withAboutVersionShown(true)
                .withAboutDescription(getString(R.string.library_description))
                .supportFragment();
    }

    if (savedInstanceState == null) {
        switchFragment(assetReceiveFragment, AssetReceiveFragment.TAG);
    }
}
 
Example 20
Project: PotRoom   File: ListRoomsActivity.java   View source code 5 votes vote down vote up
@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);
}
 
Example 21
Project: haven   File: ListActivity.java   View source code 5 votes vote down vote up
private void showLicenses ()
{
    new LibsBuilder()
            //provide a style (optional) (LIGHT, DARK, LIGHT_DARK_TOOLBAR)
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withAboutIconShown(true)
            .withAboutVersionShown(true)
            .withAboutAppName(getString(R.string.app_name))
                            //start the activity
            .start(this);
}
 
Example 22
Project: ChargeScreen   File: MainActivity.java   View source code 5 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
        case R.id.action_tutorial:
            startActivity(new Intent(MainActivity.this, IntroActivity.class));
            break;
        case R.id.action_libraries:
            new LibsBuilder().withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR).start(this);
            break;
    }
    return super.onOptionsItemSelected(item);
}
 
Example 23
Project: ocreader   File: ListActivity.java   View source code 5 votes vote down vote up
private void showAboutDialog() {
    new LibsBuilder()
            .withAboutIconShown(true)
            .withAboutVersionShown(true)
            .withAboutDescription(getString(R.string.about_app, getString(R.string.app_year_author), getString(R.string.app_url)))
            .withAboutAppName(getString(R.string.app_name))
            .withLicenseShown(true)
            .withActivityStyle(Preferences.DARK_THEME.getBoolean(PreferenceManager.getDefaultSharedPreferences(this)) ? Libs.ActivityStyle.DARK : Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withActivityTitle(getString(R.string.about))
            .withFields(R.string.class.getFields())
            .start(this);
}
 
Example 24
Project: LucaHome-AndroidApplication   File: MainActivity.java   View source code 5 votes vote down vote up
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!");
        }
    }
}
 
Example 25
Project: iroha-demo-android   File: MainActivity.java   View source code 5 votes vote down vote up
private void initFragments(Bundle savedInstanceState) {
    final FragmentManager manager = getSupportFragmentManager();
    assetReceiveFragment = (AssetReceiveFragment) manager.findFragmentByTag(AssetReceiveFragment.TAG);
    walletFragment = (WalletFragment) manager.findFragmentByTag(WalletFragment.TAG);
    assetSenderFragment = (AssetSenderFragment) manager.findFragmentByTag(AssetSenderFragment.TAG);

    if (assetReceiveFragment == null) {
        assetReceiveFragment = AssetReceiveFragment.newInstance(uuid);
    }
    if (walletFragment == null) {
        walletFragment = WalletFragment.newInstance(uuid);
    }
    if (assetSenderFragment == null) {
        assetSenderFragment = AssetSenderFragment.newInstance();
    }
    if (libsFragment == null) {
        libsFragment = new LibsBuilder()
                .withAboutIconShown(true)
                .withAboutVersionShown(true)
                .withAboutDescription(getString(R.string.library_description))
                .supportFragment();
    }

    if (savedInstanceState == null) {
        switchFragment(assetReceiveFragment, AssetReceiveFragment.TAG);
    }
}
 
Example 26
Project: Minerva   File: AboutActivity.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 27
Project: Bloop   File: BloopActivity.java   View source code 5 votes vote down vote up
/**
 * Shows an activity that describes the open source libraries used in this project.
 */
private void startAboutLibraries() {
    new LibsBuilder()
            //provide a style (optional) (LIGHT, DARK, LIGHT_DARK_TOOLBAR)
            .withActivityStyle(Libs.ActivityStyle.LIGHT)
            //start the activity
            .start(this);
}
 
Example 28
Project: prayer-times-android   File: AboutFragment.java   View source code 5 votes vote down vote up
public static void libLicences(@NonNull Context ctx) {
    new LibsBuilder()
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withActivityTitle(ctx.getString(R.string.library_licenses))
            .withLibraries()
            .start(ctx);

    Answers.getInstance().logCustom(new CustomEvent("About")
            .putCustomAttribute("action", "libLicenses")
    );
}
 
Example 29
Project: BottomDialogs   File: AboutActivity.java   View source code 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    setIntent(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)
            .intent(this));

    super.onCreate(savedInstanceState);
}
 
Example 30
Project: marvel-characters   File: ActivityHomepage.java   View source code 5 votes vote down vote up
private void addAboutLibrariesActivity() {
    ButtonRectangle button = (ButtonRectangle) this.findViewById(R.id.about_libraries);
    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            new LibsBuilder()
                    .withActivityTitle(ActivityHomepage.this.getString(R.string.app_name))
                    .withAboutIconShown(true)
                    .withAboutVersionShown(true)
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    .start(ActivityHomepage.this);
        }
    });
}
 
Example 31
Project: NewKam   File: SettingsFragment.java   View source code 5 votes vote down vote up
private void openLibs() {
        new LibsBuilder()
                .withFields(R.string.class.getFields())
                .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                .withActivityTheme(R.style.AppTheme)
                .withAboutIconShown(true)
                .withAboutVersionShown(true)
                .withAutoDetect(true)
                .withLicenseShown(true)
                .withVersionShown(true)
                .withActivityTitle("Open Source Libs")
//                    .withLibraries("Firebase Cloud Messaging", "Firebase Analytics", "PermissionHelper", "CustomActivityOnCrash", "Event Bus",
//                            "CircularReveal", "CircularFillableLoaders")
                .start(getActivity());
    }
 
Example 32
Project: MockLocations   File: MainActivity.java   View source code 5 votes vote down vote up
@Override
public void showAbout() {
    new LibsBuilder()
            .withAboutIconShown(true)
            .withAboutVersionShown(true)
            .withAboutDescription(getResources().getString(R.string.about_description))
            .withActivityTitle("关于")
            .withActivityTheme(R.style.AppTheme_AboutLibrary)
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .start(this);
}
 
Example 33
Project: fAlarm   File: MainActivity.java   View source code 5 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    Intent intent;

    //noinspection SimplifiableIfStatement
    switch (id) {
        case R.id.action_rules:
            intent = new Intent(this, RuleListActivity.class);
            startActivity(intent);
            return true;
        case R.id.action_settings:
            intent = new Intent(this, SettingsActivity.class);
            startActivity(intent);
            return true;
        case R.id.action_about:
            new LibsBuilder()
                    .withFields(R.string.class.getFields())
                    .withActivityTitle(getString(R.string.action_about))
                    .withActivityTheme(R.style.AboutLibrariesTheme_Light)
                    .start(this);
            return true;
    }

    return super.onOptionsItemSelected(item);
}
 
Example 34
Project: zSMTH-Android   File: MainActivity.java   View source code 5 votes vote down vote up
protected void initFragments() {
  hotTopicFragment = new HotTopicFragment();

  // following initilization can be delayed
  favoriteBoardFragment = new FavoriteBoardFragment();
  allBoardFragment = new AllBoardFragment();
  mailListFragment = new MailListFragment();

  preferenceFragment = new MyPreferenceFragment();
  aboutFragment = new LibsBuilder().supportFragment();
}
 
Example 35
Project: galactic-tavern-android   File: MainActivity.java   View source code 5 votes vote down vote up
/**
 * Creates the About Fragment using {@link LibsFragment}
 */
private void openAboutFragment() {
    FragmentManager fragmentManager = getSupportFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    String simpleClassName = LibsFragment.class.getSimpleName();

    mCurrentFragment = fragmentManager.findFragmentByTag(simpleClassName);
    if (mCurrentFragment == null) {
        Field[] fields = R.string.class.getFields();
        String[] excluded = new String[]{
                "ActionBarSherlock"
        };

        LibsBuilder b = new LibsBuilder()
                .withFields(fields);
        b.excludeLibraries = excluded;
        b.withAboutSpecial1(getString(R.string.privacy_policy));
        b.withAboutSpecial1Description(getString(R.string.privacy_policy_text));

        b.withAboutSpecial2(getString(R.string.changelog));
        b.withAboutSpecial2Description(getString(R.string.changelog_text));

        mCurrentFragment = b.supportFragment();
    }

    fragmentTransaction.replace(R.id.fragment_container, mCurrentFragment, simpleClassName);
    fragmentTransaction.commit();
    if (getSupportActionBar() != null) {
        getSupportActionBar().setTitle(R.string.navigation_drawer_about);
    }

    Prefs.putString(KEY_CURRENT_FRAGMENT, simpleClassName);
}
 
Example 36
Project: WhatsAppBetaUpdater   File: LicenseActivity.java   View source code 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    setIntent(new LibsBuilder()
            .withActivityTitle(getResources().getString(R.string.settings_license))
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withAutoDetect(true)
            .withLicenseShown(true)
            .intent(this));

    super.onCreate(savedInstanceState);
}
 
Example 37
Project: FastAccess   File: ActivityHelper.java   View source code 5 votes vote down vote up
public static void startLibs(@NonNull Activity activity) {
    new LibsBuilder()
            .withFields(R.string.class.getFields())
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withActivityTheme(R.style.AppTheme)
            .withAboutIconShown(true)
            .withAboutVersionShown(true)
            .withAutoDetect(true)
            .withLicenseShown(true)
            .withVersionShown(true)
            .withActivityTitle(activity.getString(R.string.libs))
            .start(activity);
}
 
Example 38
Project: prayer-times-android   File: AboutFragment.java   View source code 5 votes vote down vote up
public static void libLicences(@NonNull Context ctx) {
    new LibsBuilder()
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withActivityTitle(ctx.getString(R.string.library_licenses))
            .withLibraries()
            .start(ctx);

    Answers.getInstance().logCustom(new CustomEvent("About")
            .putCustomAttribute("action", "libLicenses")
    );
}
 
Example 39
Project: the-ssn-app   File: AboutActivity.java   View source code 5 votes vote down vote up
public void aboutLibrariesOnClick(View view) {
    new LibsBuilder()
            .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
            .withActivityTitle(getString(R.string.about_libraries))
            .withAutoDetect(true)
            .withFields(R.string.class.getFields())
            .start(this);
}
 
Example 40
Project: To.Do   File: BaseActivity.java   View source code 5 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.action_about:
            new LibsBuilder()
                    .withFields(R.string.class.getFields())
                    .withActivityTitle(getString(R.string.title_activity_about))
                    .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
                    .start(this);
            return true;
    }
    return super.onOptionsItemSelected(item);
}