create the Whats new dialog
This commit is contained in:
parent
dc3cd0813a
commit
b098aead13
13 changed files with 65 additions and 11 deletions
|
@ -0,0 +1,22 @@
|
|||
package com.simplemobiletools.commons.dialogs
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import android.view.LayoutInflater
|
||||
import com.simplemobiletools.commons.R
|
||||
|
||||
class WhatsNewDialog(val activity: Activity) {
|
||||
var dialog: AlertDialog? = null
|
||||
|
||||
init {
|
||||
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_whats_new, null)
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
.setTitle(R.string.whats_new)
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
|
||||
dialog = builder.create()
|
||||
dialog!!.setCanceledOnTouchOutside(true)
|
||||
dialog!!.show()
|
||||
}
|
||||
}
|
32
library/src/main/res/layout/dialog_whats_new.xml
Normal file
32
library/src/main/res/layout/dialog_whats_new.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/whats_new_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/whats_new_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:textSize="@dimen/normal_text_size"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider"
|
||||
android:paddingTop="@dimen/activity_margin"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/whats_new_disclaimer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.7"
|
||||
android:text="@string/whats_new_disclaimer"
|
||||
android:textSize="@dimen/smaller_text_size"/>
|
||||
</LinearLayout>
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Löschen</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Eliminar</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">डिलीट</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Törlés</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Elimina</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">削除</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Apagar</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Удалить</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Ta bort</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">删除</string>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- What's new -->
|
||||
<string name="whats_new">What\'s new</string>
|
||||
<string name="whats_new_disclaimer">Only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
<string name="whats_new_disclaimer">* only the bigger updates are listed here, there are always some smaller improvements too</string>
|
||||
|
||||
<!-- Actionbar items -->
|
||||
<string name="delete">Delete</string>
|
||||
|
|
Loading…
Reference in a new issue