Skip to content

Commit

Permalink
Add Open Source licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersantos committed Sep 1, 2015
1 parent dc0472c commit 5306d64
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.getbase/floatingactionbutton/1.10.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.navasmdc/MaterialDesign/1.5/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.yukuku/ambilwarna/2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/aboutlibraries/5.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/google-material-typeface/1.2.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/iconics-core/1.7.4/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialdrawer/4.0.3/jars" />
Expand Down Expand Up @@ -135,6 +136,7 @@
<orderEntry type="library" exported="" name="option-1.3" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.0.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.0.0" level="project" />
<orderEntry type="library" exported="" name="aboutlibraries-5.2.1" level="project" />
<orderEntry type="library" exported="" name="materialdrawer-4.0.3" level="project" />
<orderEntry type="library" exported="" name="library-3.0" level="project" />
<orderEntry type="library" exported="" name="auto-parcel-0.3" level="project" />
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ dependencies {
compile('com.mikepenz:materialdrawer:4.0.3@aar') { transitive = true; }
compile 'com.mikepenz:google-material-typeface:1.2.0.1@aar'
compile('net.rdrei.android.dirchooser:library:3.0@aar') { transitive = true; }
compile('com.mikepenz:aboutlibraries:5.2.1@aar') { transitive = true; }

}
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
android:name=".activities.SettingsActivity" />
<activity
android:name=".activities.AboutActivity" />
<activity
android:name=".activities.LicenseActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.javiersantos.mlmanager.activities;

import android.os.Bundle;

import com.javiersantos.mlmanager.R;
import com.mikepenz.aboutlibraries.Libs;
import com.mikepenz.aboutlibraries.LibsBuilder;
import com.mikepenz.aboutlibraries.ui.LibsActivity;

public class LicenseActivity extends LibsActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
setIntent(new LibsBuilder()
.withActivityTitle(getResources().getString(R.string.settings_license))
.withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
.withAutoDetect(true)
.intent(this));

super.onCreate(savedInstanceState);
}

@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(R.anim.fade_forward, R.anim.slide_out_right);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
private Toolbar toolbar;
private Context context;

private Preference prefVersion, prefDeleteAll, prefDefaultValues, prefNavigationBlack, prefCustomPath;
private Preference prefVersion, prefLicense, prefDeleteAll, prefDefaultValues, prefNavigationBlack, prefCustomPath;
private AmbilWarnaPreference prefPrimaryColor, prefFABColor;
private ListPreference prefCustomFilename, prefSortMode;
private DirectoryChooserFragment chooserDialog;
Expand All @@ -50,6 +50,7 @@ public void onCreate(Bundle savedInstanceState) {
prefs.registerOnSharedPreferenceChangeListener(this);

prefVersion = findPreference("prefVersion");
prefLicense = findPreference("prefLicense");
prefPrimaryColor = (AmbilWarnaPreference) findPreference("prefPrimaryColor");
prefFABColor = (AmbilWarnaPreference) findPreference("prefFABColor");
prefDeleteAll = findPreference("prefDeleteAll");
Expand All @@ -68,9 +69,18 @@ public void onCreate(Bundle savedInstanceState) {
prefVersion.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
startActivity(new Intent(getApplicationContext(), AboutActivity.class));
startActivity(new Intent(context, AboutActivity.class));
overridePendingTransition(R.anim.slide_in_right, R.anim.fade_back);
return true;
return false;
}
});

prefLicense.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
startActivity(new Intent(context, LicenseActivity.class));
overridePendingTransition(R.anim.slide_in_right, R.anim.fade_back);
return false;
}
});

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<string name="settings_googleplay_description">Do you have a few seconds to rate this app? We want to hear your opinion</string>
<string name="settings_googleplus">Join the community on Google+</string>
<string name="settings_googleplus_description">Want to talk about APKs and keep abreast of developments in the application? Join to our community!</string>
<string name="settings_license">Open Source licenses</string>
<string name="settings_about">Made with \u2665 from Spain</string>

<!-- About -->
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/xml/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
</PreferenceCategory>
<PreferenceCategory
android:title="@string/action_about">
<Preference
android:key="prefLicense"
android:title="@string/settings_license" />
<Preference
android:key="prefVersion"
android:title="@string/app_name"
Expand Down

0 comments on commit 5306d64

Please sign in to comment.