-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
161 additions
and
41 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
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
21 changes: 21 additions & 0 deletions
21
app/src/main/java/de/felixnuesse/disky/ui/dialogs/HelpDialog.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,21 @@ | ||
package de.felixnuesse.disky.ui.dialogs | ||
|
||
import android.content.Context | ||
import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||
import de.felixnuesse.disky.R | ||
|
||
class HelpDialog(private var mContext: Context) { | ||
|
||
fun help(title: Int, message: Int) { | ||
MaterialAlertDialogBuilder(mContext) | ||
.setTitle(mContext.getString(title)) | ||
.setMessage(mContext.getString(message)) | ||
.setPositiveButton( | ||
R.string.ok | ||
) { dialog, _ -> | ||
dialog.dismiss(); | ||
} | ||
.setIcon(R.drawable.icon_help) | ||
.show() | ||
} | ||
} |
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,19 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:autoMirrored="true" | ||
android:tint="?attr/iconTint" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
|
||
<path | ||
android:fillAlpha="0.3" | ||
android:fillColor="@android:color/white" | ||
android:pathData="M12,4c-4.41,0 -8,3.59 -8,8s3.59,8 8,8 8,-3.59 8,-8 -3.59,-8 -8,-8zM13,18h-2v-2h2v2zM13,15h-2c0,-3.25 3,-3 3,-5 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,10c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,2.5 -3,2.75 -3,5z" | ||
android:strokeAlpha="0.3" /> | ||
|
||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M11,16h2v2h-2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z" /> | ||
|
||
</vector> |
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,73 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/main" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".FAQActivity"> | ||
|
||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
android:background="@null" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:navigationIcon="@drawable/icon_logo" | ||
app:title="@string/faq" /> | ||
|
||
<TextView | ||
android:id="@+id/faq_label_accuracy" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="32dp" | ||
android:layout_marginTop="32dp" | ||
android:layout_marginEnd="32dp" | ||
android:fontFamily="sans-serif-medium" | ||
android:text="@string/faq_label_accuracy" | ||
android:textSize="14sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/toolbar" /> | ||
|
||
<TextView | ||
android:id="@+id/faq_answer_accuracy" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="16dp" | ||
android:text="@string/faq_answer_accuracy" | ||
app:layout_constraintEnd_toEndOf="@+id/faq_label_accuracy" | ||
app:layout_constraintStart_toStartOf="@+id/faq_label_accuracy" | ||
app:layout_constraintTop_toBottomOf="@+id/faq_label_accuracy" /> | ||
|
||
<TextView | ||
android:id="@+id/faq_label_androidos" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="32dp" | ||
android:layout_marginTop="32dp" | ||
android:layout_marginEnd="32dp" | ||
android:fontFamily="sans-serif-medium" | ||
android:text="@string/faq_label_androidos" | ||
android:textSize="14sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/faq_answer_accuracy" /> | ||
|
||
<TextView | ||
android:id="@+id/faq_answer_androidos" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="16dp" | ||
android:text="@string/faq_answer_androidos" | ||
app:layout_constraintEnd_toEndOf="@+id/faq_label_androidos" | ||
app:layout_constraintStart_toStartOf="@+id/faq_label_androidos" | ||
app:layout_constraintTop_toBottomOf="@+id/faq_label_androidos" /> | ||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item | ||
android:id="@+id/action_os_help" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:icon="@drawable/icon_help" | ||
android:title="@string/help" /> | ||
</menu> |
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
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