use the shared License activity
This commit is contained in:
parent
717138d53b
commit
b81ef925e4
|
@ -55,8 +55,9 @@
|
|||
android:parentActivityName=".activities.DayActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.LicenseActivity"
|
||||
android:label="@string/third_party_licences"/>
|
||||
android:name="com.simplemobiletools.commons.activities.LicenseActivity"
|
||||
android:label="@string/third_party_licences"
|
||||
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.SettingsActivity"
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
package com.simplemobiletools.calendar.activities
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import com.simplemobiletools.calendar.R
|
||||
import kotlinx.android.synthetic.main.activity_license.*
|
||||
|
||||
class LicenseActivity : SimpleActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_license)
|
||||
|
||||
license_kotlin_title.setOnClickListener { openUrl(R.string.kotlin_url) }
|
||||
license_ambilwarna_title.setOnClickListener { openUrl(R.string.ambilwarna_url) }
|
||||
license_joda_title.setOnClickListener { openUrl(R.string.joda_url) }
|
||||
license_stetho_title.setOnClickListener { openUrl(R.string.stetho_url) }
|
||||
}
|
||||
|
||||
private fun openUrl(id: Int) {
|
||||
val url = resources.getString(id)
|
||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
startActivity(browserIntent)
|
||||
}
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/license_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/license"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/activity_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/notice"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_kotlin_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/kotlin_title"
|
||||
android:textColor="@color/color_primary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_kotlin_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/kotlin_text"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_ambilwarna_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/ambilwarna_title"
|
||||
android:textColor="@color/color_primary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_ambilwarna_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ambilwarna_text"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_joda_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/joda_title"
|
||||
android:textColor="@color/color_primary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_joda_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/joda_text"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_stetho_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/stetho_title"
|
||||
android:textColor="@color/color_primary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_stetho_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/stetho_text"/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
Loading…
Reference in New Issue