Switch to Attribouter licenses activity
This commit is contained in:
parent
feec3ec45d
commit
751a1ce3be
10 changed files with 204 additions and 17 deletions
|
@ -41,6 +41,7 @@ dependencies {
|
|||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'me.jfenn:Attribouter:0.1.5'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
||||
|
|
|
@ -30,11 +30,6 @@
|
|||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activities.LicensesActivity"
|
||||
android:label="@string/licenses"
|
||||
android:theme="@style/MaterialAppTheme">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activities.UsbDrivePickerActivity"
|
||||
android:label="@string/title_activity_usb_drive_picker"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.depau.etchdroid.activities
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
|
@ -14,6 +13,7 @@ import eu.depau.etchdroid.R
|
|||
import eu.depau.etchdroid.kotlin_exts.toast
|
||||
import eu.depau.etchdroid.utils.DoNotShowAgainDialogFragment
|
||||
import eu.depau.etchdroid.utils.NightModeHelper
|
||||
import me.jfenn.attribouter.Attribouter
|
||||
|
||||
|
||||
abstract class ActivityBase : AppCompatActivity() {
|
||||
|
@ -80,13 +80,12 @@ abstract class ActivityBase : AppCompatActivity() {
|
|||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
// 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.
|
||||
return when (item.itemId) {
|
||||
R.id.action_licenses -> {
|
||||
val intent = Intent(this, LicensesActivity::class.java)
|
||||
startActivity(intent)
|
||||
R.id.action_about -> {
|
||||
Attribouter
|
||||
.from(this)
|
||||
.withFile(R.xml.about)
|
||||
.show()
|
||||
return true
|
||||
}
|
||||
R.id.action_reset_warnings -> {
|
||||
|
|
11
app/src/main/res/drawable/ic_fdroid_logo_24dp.xml
Normal file
11
app/src/main/res/drawable/ic_fdroid_logo_24dp.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<vector android:height="24dp" android:viewportHeight="48"
|
||||
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillAlpha="1" android:fillColor="#000000"
|
||||
android:pathData="M8,20.0449C7.7923,20.0449 7.5902,20.0656 7.3945,20.1055C6.8076,20.225 6.2836,20.5152 5.877,20.9219C5.4703,21.3286 5.18,21.8506 5.0605,22.4375C5.0207,22.6331 5,22.8372 5,23.0449L5,30.0449L5,42.2754L5,43.0449C5,43.6682 5.1889,44.246 5.5117,44.7246C6.0498,45.5224 6.9612,46.0449 8,46.0449L40,46.0449C41.0387,46.0449 41.9502,45.5224 42.4883,44.7246C42.5959,44.5651 42.6899,44.3944 42.7656,44.2148C42.917,43.8557 43,43.4604 43,43.0449L43,42.2754L43,36.0449L43,23.8125L43,23.0449C43,22.6294 42.917,22.2342 42.7656,21.875C42.6899,21.6954 42.5959,21.5248 42.4883,21.3652C41.9502,20.5675 41.0387,20.0449 40,20.0449L8,20.0449zM24,22.5254A10.5182,10.5182 0,0 1,34.5176 33.0449A10.5182,10.5182 0,0 1,24 43.5625A10.5182,10.5182 0,0 1,13.4824 33.0449A10.5182,10.5182 0,0 1,24 22.5254zM24,24.4492A8.5958,8.5958 0,0 0,15.4043 33.0449A8.5958,8.5958 0,0 0,24 41.6406A8.5958,8.5958 0,0 0,32.5957 33.0449A8.5958,8.5958 0,0 0,24 24.4492zM24,26.75C27.434,26.75 30.25,29.566 30.25,33C30.25,36.434 27.434,39.25 24,39.25C21.0479,39.25 18.5583,37.1661 17.916,34.4004L21.0703,34.4004C21.5888,35.4973 22.6926,36.25 24,36.25C25.8127,36.25 27.25,34.8127 27.25,33C27.25,31.1873 25.8127,29.75 24,29.75C22.7748,29.75 21.734,30.415 21.1797,31.4004L17.9668,31.4004C18.6802,28.7347 21.1193,26.75 24,26.75z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="1.89999998"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#000000"
|
||||
android:pathData="M2.3379,1.5254C1.8997,1.5254 1.378,1.6672 1.5137,2.3242C1.6007,2.7458 4.4144,6.2239 5.4434,7.4902C5.2677,7.7794 5.1304,8.0942 5.0605,8.4375C5.0207,8.6331 5,8.8372 5,9.0449L5,9.582L5,12.0449L5,13.0449L5,15.5059L5,16.0449C5,16.6682 5.1889,17.246 5.5117,17.7246C6.0498,18.5224 6.9612,19.0449 8,19.0449L40,19.0449C41.0387,19.0449 41.9502,18.5224 42.4883,17.7246C42.5959,17.5651 42.6899,17.3944 42.7656,17.2148C42.8413,17.0353 42.8996,16.846 42.9395,16.6504C42.9793,16.4547 43,16.2527 43,16.0449L43,15.5059L43,13.0449L43,12.0449L43,9.582L43,9.0449C43,8.8372 42.9793,8.6331 42.9395,8.4375C42.8696,8.0942 42.7323,7.7794 42.5566,7.4902C43.5856,6.2239 46.3993,2.7458 46.4863,2.3242C46.622,1.6672 46.1003,1.5254 45.6621,1.5254C45.1945,1.5396 44.8462,1.9932 44.5859,2.2832L41.3984,6.4023C40.9796,6.1808 40.5086,6.0449 40,6.0449L8,6.0449C7.7923,6.0449 7.5902,6.0656 7.3945,6.1055C7.1989,6.1453 7.0097,6.2036 6.8301,6.2793C6.7496,6.3132 6.6782,6.3618 6.6016,6.4023L3.4141,2.2832C3.1538,1.9932 2.8055,1.5396 2.3379,1.5254zM14.375,9.75A3.375,3.375 0,0 1,17.75 13.125A3.375,3.375 0,0 1,14.375 16.5A3.375,3.375 0,0 1,11 13.125A3.375,3.375 0,0 1,14.375 9.75zM33.875,9.75A3.375,3.375 0,0 1,37.25 13.125A3.375,3.375 0,0 1,33.875 16.5A3.375,3.375 0,0 1,30.5 13.125A3.375,3.375 0,0 1,33.875 9.75z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="1.89999998"/>
|
||||
</vector>
|
|
@ -3,9 +3,9 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="eu.depau.etchdroid.activities.StartActivity">
|
||||
<item
|
||||
android:id="@+id/action_licenses"
|
||||
android:id="@+id/action_about"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/licenses"
|
||||
android:title="@string/about"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<string name="license_gpl2">GNU GPLv2</string>
|
||||
<string name="license_bzip2">Custom BSD-like</string>
|
||||
<string name="license_custom">Custom</string>
|
||||
<string name="licenses">Licenze</string>
|
||||
<string name="about">Informazioni</string>
|
||||
<string name="dmg2img_license_desc">Converte immagini Apple® DMG compresse</string>
|
||||
<string name="title_activity_usb_drive_picker">Seleziona dispositivo USB</string>
|
||||
<string name="title_activity_confirmation">Pronto a scrivere</string>
|
||||
|
|
|
@ -9,4 +9,10 @@
|
|||
<style name="CardContentStyleBase" parent="ThemeOverlay.AppCompat.Dark">
|
||||
<item name="android:background">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="AttribouterTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="personDialogTheme">@style/PersonDialogTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="PersonDialogTheme" parent="ThemeOverlay.AppCompat.Dialog"/>
|
||||
</resources>
|
|
@ -65,7 +65,7 @@
|
|||
<string name="license_gpl2">GNU GPLv2</string>
|
||||
<string name="license_bzip2">Özel BSD benzeri</string>
|
||||
<string name="license_custom">Özel</string>
|
||||
<string name="licenses">Lisanslar</string>
|
||||
<string name="about">Lisanslar</string>
|
||||
<string name="dmg2img_license_desc">Sıkıştırılmış Apple® DMG imajlarını dönüştürür.</string>
|
||||
<string name="title_activity_usb_drive_picker">USB aygıtı seçin.</string>
|
||||
<string name="title_activity_confirmation">Yazmaya hazır.</string>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<string name="license_gpl2">GNU GPLv2</string>
|
||||
<string name="license_bzip2">Custom BSD-like</string>
|
||||
<string name="license_custom">Custom</string>
|
||||
<string name="licenses">Licenses</string>
|
||||
<string name="about">About</string>
|
||||
<string name="dmg2img_license_desc">Converts compressed Apple® DMG images</string>
|
||||
<string name="title_activity_usb_drive_picker">Select USB drive</string>
|
||||
<string name="title_activity_confirmation">Ready to write</string>
|
||||
|
@ -110,4 +110,46 @@
|
|||
<string name="file_type_not_supported">File type not supported</string>
|
||||
<string name="cannot_find_file_in_storage">Cannot find file in internal storage. Try opening it from within the app.</string>
|
||||
<string name="storage_permission_required">Storage permission is required to read DMG images</string>
|
||||
|
||||
|
||||
<!-- AndroidX Jetpack -->
|
||||
<string name="define_AndroidX" translatable="false"/>
|
||||
<string name="library_AndroidX_author" translatable="false">AOSP</string>
|
||||
<string name="library_AndroidX_authorWebsite" translatable="false">https://developer.android.com</string>
|
||||
<string name="library_AndroidX_libraryName" translatable="false">AndroidX Jetpack</string>
|
||||
<string name="library_AndroidX_libraryDescription">AndroidX is a major improvement to the original Android Support Library and provides backwards-compatibility across Android releases</string>
|
||||
<string name="library_AndroidX_libraryWebsite">https://developer.android.com/jetpack/androidx/</string>
|
||||
<string name="library_AndroidX_libraryVersion">1.0.1</string>
|
||||
<string name="library_AndroidX_isOpenSource">true</string>
|
||||
<string name="library_AndroidX_repositoryLink">https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/</string>
|
||||
<string name="library_AndroidX_licenseId" translatable="false">apache_2_0</string>
|
||||
|
||||
|
||||
<!-- Kotlin Standard Library -->
|
||||
<string name="define_KotlinStdlib"/>
|
||||
<string name="library_KotlinStdlib_author">JetBrains</string>
|
||||
<string name="library_KotlinStdlib_authorWebsite">https://kotlinlang.org/</string>
|
||||
<string name="library_KotlinStdlib_libraryName">Kotlin Standard Library</string>
|
||||
<string name="library_KotlinStdlib_libraryDescription">The Kotlin Standard Library provides living essentials for everyday work with Kotlin</string>
|
||||
<string name="library_KotlinStdlib_libraryWebsite">https://kotlinlang.org/api/latest/jvm/stdlib/index.html</string>
|
||||
<string name="library_KotlinStdlib_libraryVersion">1.2.71</string>
|
||||
<string name="library_KotlinStdlib_isOpenSource">true</string>
|
||||
<string name="library_KotlinStdlib_repositoryLink">https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib</string>
|
||||
<string name="library_KotlinStdlib_licenseId">apache_2_0</string>
|
||||
|
||||
|
||||
<!-- Material Components -->
|
||||
<string name="define_Material"/>
|
||||
<string name="library_Material_author">Google</string>
|
||||
<string name="library_Material_authorWebsite">https://material.io/develop/</string>
|
||||
<string name="library_Material_libraryName">Material Components</string>
|
||||
<string name="library_Material_libraryDescription">Make beautiful products, faster. Material is a design system – backed by open-source code – that helps teams build digital experiences</string>
|
||||
<string name="library_Material_libraryWebsite">https://material.io/develop/android/</string>
|
||||
<string name="library_Material_libraryVersion">1.1.0-alpha01</string>
|
||||
<string name="library_Material_isOpenSource">true</string>
|
||||
<string name="library_Material_repositoryLink">https://github.com/material-components/material-components-android</string>
|
||||
<string name="library_Material_licenseId">apache_2_0</string>
|
||||
|
||||
<string name="app_desc">An application to write OS images to USB drives, on Android, no root required.</string>
|
||||
|
||||
</resources>
|
||||
|
|
133
app/src/main/res/xml/about.xml
Normal file
133
app/src/main/res/xml/about.xml
Normal file
|
@ -0,0 +1,133 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<about>
|
||||
<me.jfenn.attribouter.wedges.AppWedge repo="Depau/EtchDroid">
|
||||
<me.jfenn.attribouter.wedges.link.LinkWedge
|
||||
name="F-Droid"
|
||||
icon="@drawable/ic_fdroid_logo_24dp"
|
||||
url="https://f-droid.org/en/packages/eu.depau.etchdroid/" />
|
||||
<me.jfenn.attribouter.wedges.link.LinkWedge id="playStore" />
|
||||
<me.jfenn.attribouter.wedges.link.LinkWedge
|
||||
name="^GitHub"
|
||||
id="github" />
|
||||
</me.jfenn.attribouter.wedges.AppWedge>
|
||||
|
||||
<me.jfenn.attribouter.wedges.ContributorsWedge showDefaults="false">
|
||||
<me.jfenn.attribouter.wedges.ContributorWedge
|
||||
name="Davide Depau"
|
||||
bio="My dream is meeting the love of my life here just to be able to say "we met on GitHub". GNU/Linux and Python lover, gay as fuck."
|
||||
email="davide@depau.eu"
|
||||
login="Depau"
|
||||
position="1"
|
||||
task="Owner">
|
||||
<me.jfenn.attribouter.wedges.link.LinkWedge
|
||||
name="Instagram"
|
||||
icon="https://instagram.com/favicon.ico"
|
||||
url="https://instagram.com/depau.py" />
|
||||
<me.jfenn.attribouter.wedges.link.LinkWedge
|
||||
name="StackOverflow"
|
||||
icon="https://stackoverflow.com/favicon.ico"
|
||||
url="https://stackoverflow.com/story/depau" />
|
||||
<me.jfenn.attribouter.wedges.link.LinkWedge
|
||||
name="PayPal"
|
||||
icon="https://paypal.com/favicon.ico"
|
||||
url="https://paypal.me/DavideDepau/5" />
|
||||
</me.jfenn.attribouter.wedges.ContributorWedge>
|
||||
</me.jfenn.attribouter.wedges.ContributorsWedge>
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicensesWedge
|
||||
overflow="5"
|
||||
showDefaults="true">
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="An application to write OS images to USB drives, on Android, no root required."
|
||||
license="gpl-3.0"
|
||||
licenseName="GNU General Public License v3.0"
|
||||
repo="Depau/EtchDroid"
|
||||
title="This app"
|
||||
website="https://etchdroid.depau.eu" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="^@string/app_desc"
|
||||
license="gpl-3.0"
|
||||
licenseName="GNU GPL v3.0"
|
||||
repo="Depau/EtchDroid"
|
||||
title="^@string/this_app"
|
||||
website="https://etchdroid.depau.eu" />
|
||||
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="^@string/storagechooser_license_description"
|
||||
license="mpl-2.0"
|
||||
licenseName="Mozilla Public License 2.0"
|
||||
repo="codekidX/storage-chooser"
|
||||
title="Storage Chooser" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="^@string/libaums_license_desc"
|
||||
license="apache-2.0"
|
||||
licenseName="Apache 2.0"
|
||||
repo="Depau/libaums"
|
||||
title="libaums (fork)" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="^@string/dmg2img_license_desc"
|
||||
license="gpl-2.0"
|
||||
licenseName="GNU General Public License 2.0"
|
||||
repo="Depau/dmg2img-cmake"
|
||||
title="dmg2img (fork)" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
licenseBody="@string/license_bzip2"
|
||||
licenseName="Other"
|
||||
repo="LuaDist/bzip2"
|
||||
title="bzip2" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
licenseName="Custom FOSS"
|
||||
repo="Depau/libressl"
|
||||
title="LibreSSL" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="@string/library_AndroidX_libraryDescription"
|
||||
license="apache-2.0"
|
||||
licenseName="Apache License 2.0"
|
||||
licenseUrl="https://choosealicense.com/licenses/apache-2.0/"
|
||||
title="@string/library_AndroidX_libraryName"
|
||||
website="@string/library_AndroidX_libraryWebsite" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="@string/library_KotlinStdlib_libraryDescription"
|
||||
license="apache-2.0"
|
||||
licenseName="Apache License 2.0"
|
||||
licenseUrl="https://choosealicense.com/licenses/apache-2.0/"
|
||||
title="@string/library_KotlinStdlib_libraryName"
|
||||
website="@string/library_KotlinStdlib_libraryWebsite" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
description="@string/library_Material_libraryDescription"
|
||||
license="apache-2.0"
|
||||
licenseName="Apache License 2.0"
|
||||
licenseUrl="https://choosealicense.com/licenses/apache-2.0/"
|
||||
title="@string/library_Material_libraryName"
|
||||
website="@string/library_Material_libraryWebsite" />
|
||||
|
||||
<me.jfenn.attribouter.wedges.LicenseWedge
|
||||
repo="google/guava"
|
||||
license="apache-2.0"
|
||||
licenseName="Apache License 2.0"
|
||||
licenseUrl="https://choosealicense.com/licenses/apache-2.0/"/>
|
||||
|
||||
</me.jfenn.attribouter.wedges.LicensesWedge>
|
||||
|
||||
<me.jfenn.attribouter.wedges.TranslatorsWedge overflow="5">
|
||||
<me.jfenn.attribouter.wedges.TranslatorWedge
|
||||
name="Davide Depau"
|
||||
locales="it"
|
||||
login="Depau" />
|
||||
<me.jfenn.attribouter.wedges.TranslatorWedge
|
||||
name="Can Berberoglu"
|
||||
avatar="https://avatars1.githubusercontent.com/u/21688873"
|
||||
locales="tr"
|
||||
login="Exodus1831" />
|
||||
</me.jfenn.attribouter.wedges.TranslatorsWedge>
|
||||
</about>
|
Loading…
Reference in a new issue