-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from rumaan/about-activity
Added Licences activity
- Loading branch information
Showing
13 changed files
with
292 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
/google-services.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/com/thecoolguy/rumaan/fileio/ui/activities/LicenseActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.thecoolguy.rumaan.fileio.ui.activities | ||
|
||
import android.content.Context | ||
import android.net.Uri | ||
import com.danielstone.materialaboutlibrary.ConvenienceBuilder | ||
import com.danielstone.materialaboutlibrary.MaterialAboutActivity | ||
import com.danielstone.materialaboutlibrary.items.MaterialAboutActionItem | ||
import com.danielstone.materialaboutlibrary.model.MaterialAboutCard | ||
import com.danielstone.materialaboutlibrary.model.MaterialAboutList | ||
import com.danielstone.materialaboutlibrary.util.OpenSourceLicense | ||
import com.thecoolguy.rumaan.fileio.R | ||
|
||
class LicenseActivity : MaterialAboutActivity() { | ||
|
||
override fun getActivityTitle(): CharSequence? = "Open Source Licenses" | ||
|
||
override fun getMaterialAboutList(context: Context): MaterialAboutList { | ||
val icon = getDrawable(R.drawable.ic_library) | ||
val apache = OpenSourceLicense.APACHE_2 | ||
val mit = OpenSourceLicense.MIT | ||
|
||
val aospCard = ConvenienceBuilder | ||
.createLicenseCard(context, icon, "AOSP Support Libraries", "2011", "The Android Open Source Project", apache) | ||
|
||
val archCard = ConvenienceBuilder | ||
.createLicenseCard(context, icon, "Architecture Components", "2017", "The Android Open Source Project", apache) | ||
|
||
val malCard = ConvenienceBuilder | ||
.createLicenseCard(context, icon, "MaterialAboutLibrary", "2016", "Daniel Stone", apache) | ||
|
||
val fuelCard = ConvenienceBuilder | ||
.createLicenseCard(context, icon, "Fuel", "2018", "Kittinun Vantasin", mit) | ||
|
||
val npbCard = ConvenienceBuilder | ||
.createLicenseCard(context, icon, "NumberProgressBar", "2014", "daimajia", mit) | ||
|
||
val permissionCard = ConvenienceBuilder | ||
.createLicenseCard(context, icon, "Permission Dispatcher", "2016", "Shintaro Katafuchi, Marcel Schnelle, Yoshinori Isogai", apache) | ||
|
||
val crashCard = ConvenienceBuilder | ||
.createLicenseCard(context, icon, "CustomActivityOnCrash", "2015", "Eduard Ereza Martínez", apache) | ||
|
||
return MaterialAboutList(aospCard, archCard, malCard, fuelCard, | ||
npbCard, permissionCard, crashCard) | ||
} | ||
} |
Oops, something went wrong.