-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Truncate changelog and add the link to the website
- Loading branch information
Showing
7 changed files
with
61 additions
and
1,304 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
34 changes: 0 additions & 34 deletions
34
app/src/main/java/com/orgzly/android/ui/dialogs/WhatsNewDialog.java
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/orgzly/android/ui/dialogs/WhatsNewDialog.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,35 @@ | ||
package com.orgzly.android.ui.dialogs | ||
|
||
import android.content.Context | ||
import android.text.method.LinkMovementMethod | ||
import android.widget.TextView | ||
import androidx.appcompat.app.AlertDialog | ||
import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||
import com.orgzly.R | ||
import com.orgzly.android.ui.util.getLayoutInflater | ||
import com.orgzly.android.util.MiscUtils | ||
|
||
object WhatsNewDialog { | ||
/** | ||
* Display dialog with changes. | ||
*/ | ||
fun create(context: Context): AlertDialog { | ||
val layoutView = context.getLayoutInflater().inflate(R.layout.dialog_whats_new, null, false) | ||
|
||
layoutView.findViewById<TextView>(R.id.dialog_whats_new_intro).apply { | ||
text = MiscUtils.fromHtml(context.getString(R.string.whats_new_intro)) | ||
movementMethod = LinkMovementMethod.getInstance() | ||
} | ||
|
||
layoutView.findViewById<TextView>(R.id.dialog_whats_new_outro).apply { | ||
text = MiscUtils.fromHtml(context.getString(R.string.whats_new_outro)) | ||
movementMethod = LinkMovementMethod.getInstance() | ||
} | ||
|
||
return MaterialAlertDialogBuilder(context) | ||
.setTitle(R.string.whats_new_title) | ||
.setPositiveButton(R.string.ok, null) | ||
.setView(layoutView) | ||
.create() | ||
} | ||
} |
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
Oops, something went wrong.