Loading commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/DonateDialog.kt +4 −4 Original line number Diff line number Diff line Loading @@ -7,13 +7,13 @@ import android.text.method.LinkMovementMethod import com.simplemobiletools.commons.R import com.simplemobiletools.commons.extensions.launchViewIntent import com.simplemobiletools.commons.extensions.setupDialogStuff import kotlinx.android.synthetic.main.dialog_donate.view.* import kotlinx.android.synthetic.main.dialog_textview.view.* class DonateDialog(val activity: Activity) { init { val view = activity.layoutInflater.inflate(R.layout.dialog_donate, null).apply { donate.text = Html.fromHtml(activity.getString(R.string.donate_please)) donate.movementMethod = LinkMovementMethod.getInstance() val view = activity.layoutInflater.inflate(R.layout.dialog_textview, null).apply { text_view.text = Html.fromHtml(activity.getString(R.string.donate_please)) text_view.movementMethod = LinkMovementMethod.getInstance() } AlertDialog.Builder(activity) Loading commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/NewAppDialog.kt 0 → 100644 +25 −0 Original line number Diff line number Diff line package com.simplemobiletools.commons.dialogs import android.app.Activity import android.support.v7.app.AlertDialog import android.text.Html import android.text.method.LinkMovementMethod import com.simplemobiletools.commons.R import com.simplemobiletools.commons.extensions.setupDialogStuff import kotlinx.android.synthetic.main.dialog_textview.view.* class NewAppDialog(val activity: Activity, val packageName: String, val title: String) { init { val view = activity.layoutInflater.inflate(R.layout.dialog_textview, null).apply { val text = String.format(activity.getString(R.string.new_app), "https://play.google.com/store/apps/details?id=$packageName", title) text_view.text = Html.fromHtml(text) text_view.movementMethod = LinkMovementMethod.getInstance() } AlertDialog.Builder(activity) .setPositiveButton(R.string.ok, null) .create().apply { activity.setupDialogStuff(view, this) } } } commons/src/main/res/layout/dialog_donate.xml→commons/src/main/res/layout/dialog_textview.xml +1 −2 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <com.simplemobiletools.commons.views.MyTextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/donate" android:id="@+id/text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="@dimen/activity_margin" android:paddingRight="@dimen/activity_margin" android:paddingTop="@dimen/activity_margin" android:text="@string/donate_please" android:textSize="@dimen/normal_text_size"/> commons/src/main/res/values-ca/strings.xml +11 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,17 @@ </string> <string name="purchase">Comprar</string> <!-- New app (do not translate anything on the 4th line) --> <string name="new_app"> <![CDATA[ Hey,<br><br> just letting you know that a new app has been released recently:<br><br> <a href="%1$s">%2$s</a><br><br> You can download it by pressing the title.<br><br> Thanks ]]> </string> <!-- FAQ --> <string name="frequently_asked_questions">Preguntes frequents</string> <string name="faq_1_title_commons">Com és que no veig aquest widget a la llista de widgets?</string> Loading commons/src/main/res/values-cs/strings.xml +11 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,17 @@ </string> <string name="purchase">Purchase</string> <!-- New app (do not translate anything on the 4th line) --> <string name="new_app"> <![CDATA[ Hey,<br><br> just letting you know that a new app has been released recently:<br><br> <a href="%1$s">%2$s</a><br><br> You can download it by pressing the title.<br><br> Thanks ]]> </string> <!-- FAQ --> <string name="frequently_asked_questions">Frequently asked questions</string> <string name="faq_1_title_commons">How come I don\'t see this apps widget on the list of widgets?</string> Loading Loading
commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/DonateDialog.kt +4 −4 Original line number Diff line number Diff line Loading @@ -7,13 +7,13 @@ import android.text.method.LinkMovementMethod import com.simplemobiletools.commons.R import com.simplemobiletools.commons.extensions.launchViewIntent import com.simplemobiletools.commons.extensions.setupDialogStuff import kotlinx.android.synthetic.main.dialog_donate.view.* import kotlinx.android.synthetic.main.dialog_textview.view.* class DonateDialog(val activity: Activity) { init { val view = activity.layoutInflater.inflate(R.layout.dialog_donate, null).apply { donate.text = Html.fromHtml(activity.getString(R.string.donate_please)) donate.movementMethod = LinkMovementMethod.getInstance() val view = activity.layoutInflater.inflate(R.layout.dialog_textview, null).apply { text_view.text = Html.fromHtml(activity.getString(R.string.donate_please)) text_view.movementMethod = LinkMovementMethod.getInstance() } AlertDialog.Builder(activity) Loading
commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/NewAppDialog.kt 0 → 100644 +25 −0 Original line number Diff line number Diff line package com.simplemobiletools.commons.dialogs import android.app.Activity import android.support.v7.app.AlertDialog import android.text.Html import android.text.method.LinkMovementMethod import com.simplemobiletools.commons.R import com.simplemobiletools.commons.extensions.setupDialogStuff import kotlinx.android.synthetic.main.dialog_textview.view.* class NewAppDialog(val activity: Activity, val packageName: String, val title: String) { init { val view = activity.layoutInflater.inflate(R.layout.dialog_textview, null).apply { val text = String.format(activity.getString(R.string.new_app), "https://play.google.com/store/apps/details?id=$packageName", title) text_view.text = Html.fromHtml(text) text_view.movementMethod = LinkMovementMethod.getInstance() } AlertDialog.Builder(activity) .setPositiveButton(R.string.ok, null) .create().apply { activity.setupDialogStuff(view, this) } } }
commons/src/main/res/layout/dialog_donate.xml→commons/src/main/res/layout/dialog_textview.xml +1 −2 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <com.simplemobiletools.commons.views.MyTextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/donate" android:id="@+id/text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="@dimen/activity_margin" android:paddingRight="@dimen/activity_margin" android:paddingTop="@dimen/activity_margin" android:text="@string/donate_please" android:textSize="@dimen/normal_text_size"/>
commons/src/main/res/values-ca/strings.xml +11 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,17 @@ </string> <string name="purchase">Comprar</string> <!-- New app (do not translate anything on the 4th line) --> <string name="new_app"> <![CDATA[ Hey,<br><br> just letting you know that a new app has been released recently:<br><br> <a href="%1$s">%2$s</a><br><br> You can download it by pressing the title.<br><br> Thanks ]]> </string> <!-- FAQ --> <string name="frequently_asked_questions">Preguntes frequents</string> <string name="faq_1_title_commons">Com és que no veig aquest widget a la llista de widgets?</string> Loading
commons/src/main/res/values-cs/strings.xml +11 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,17 @@ </string> <string name="purchase">Purchase</string> <!-- New app (do not translate anything on the 4th line) --> <string name="new_app"> <![CDATA[ Hey,<br><br> just letting you know that a new app has been released recently:<br><br> <a href="%1$s">%2$s</a><br><br> You can download it by pressing the title.<br><br> Thanks ]]> </string> <!-- FAQ --> <string name="frequently_asked_questions">Frequently asked questions</string> <string name="faq_1_title_commons">How come I don\'t see this apps widget on the list of widgets?</string> Loading