Skip to content

Commit

Permalink
"Learn more" link to website
Browse files Browse the repository at this point in the history
  • Loading branch information
carl committed May 21, 2017
1 parent ff4ca54 commit 4e2aed6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
6 changes: 6 additions & 0 deletions app/src/main/java/org/standardnotes/notes/SettingsActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class SettingsActivity : BaseActivity() {
SettingsFragment()).commit()
export.setOnClickListener { exportData() }
feedback.setOnClickListener { startFeedbackIntent() }
learnMore.setOnClickListener {
val url = "https://standardnotes.org/"
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse(url)
startActivity(intent)
}
logout.setOnClickListener { logout() }
version.text = "v" + packageManager.getPackageInfo(packageName, 0).versionName
}
Expand Down
19 changes: 16 additions & 3 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fillViewport="true">

<LinearLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -46,6 +47,19 @@

</RadioGroup>

<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />

<Button
android:id="@+id/learnMore"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:text="Learn more about Standard Notes" />

<Button
android:id="@+id/feedback"
android:layout_width="match_parent"
Expand All @@ -67,8 +81,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
/>
android:layout_marginRight="@dimen/activity_horizontal_margin" />

</LinearLayout>
</ScrollView>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<string name="title_activity_main">MainActivity</string>

<!-- Strings related to menu if user is logged in -->
<string name="action_logout">Log out</string>
<string name="action_logout">Sign out</string>
<string name="action_settings">Settings</string>
<string name="action_toggle_screenshots">Enable Screenshots</string>
<string name="action_toggle_monospace">Use Monospace font for notes</string>
Expand Down

0 comments on commit 4e2aed6

Please sign in to comment.