Skip to content

Commit

Permalink
Merge pull request #85 from AdiAr11/talk_to_us
Browse files Browse the repository at this point in the history
talk_to_us button added
  • Loading branch information
justdvnsh authored Oct 15, 2021
2 parents 7d7e826 + 147eb68 commit ff3318d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ class SettingsFragment: Fragment(){
binding.uiMode.setOnClickListener{showUIDialog()}
binding.aboutSettings.setOnClickListener { aboutSettings() }
binding.supportUsSettings.setOnClickListener { toSupportUs() }
binding.talkToUsSettings.setOnClickListener { talkToUs() }
}

private fun talkToUs() {
val uri: Uri = Uri.parse("https://join.slack.com/t/animeclassroom/shared_invite/zt-wut0t5mp-Y4kF6OGyxLBpyNM0eU6psw")
val intent = Intent(Intent.ACTION_VIEW, uri)
startActivity(intent)
}

private fun toSupportUs() {
Expand Down
33 changes: 33 additions & 0 deletions app/src/main/res/layout/fragment_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,39 @@

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/talk_to_us_settings"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/secondary_background"
android:layout_marginTop="20dp"
android:foreground="?selectableItemBackground"
android:clickable="true"
android:focusable="true">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:text="@string/talk_to_us"
android:textSize="16sp"
android:layout_marginStart="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="16dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:src="@drawable/ic_baseline_arrow_forward_ios_24"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>
</LinearLayout>
</layout>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@
<string name="support_us">Support Us</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="talk_to_us">Talk To Us</string>
</resources>

0 comments on commit ff3318d

Please sign in to comment.