Commit b7dcbc21 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Add a link to the FAQs

Implements #257
parent 3918af91
package com.frostnerd.smokescreen.fragment
import android.content.ActivityNotFoundException
import android.content.Intent
import android.net.Uri
import android.os.Build
......@@ -7,6 +8,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.Fragment
import com.frostnerd.smokescreen.*
import com.frostnerd.smokescreen.database.AppDatabase
......@@ -115,5 +117,18 @@ class AboutFragment : Fragment() {
if(queryGenStepOne) QueryGeneratorDialog(requireContext())
true
}
view.faq.setOnClickListener {
try {
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse("https://nebulo.app/faq")
)
)
} catch (e: ActivityNotFoundException) {
Toast.makeText(requireContext(), R.string.error_no_webbrowser_installed, Toast.LENGTH_LONG)
.show()
}
}
}
}
\ No newline at end of file
......@@ -195,6 +195,28 @@
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:id="@+id/faq"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:layout_height="wrap_content">
<ImageView
android:layout_width="30dp"
android:src="@drawable/ic_query_question"
android:layout_height="30dp"/>
<TextView
android:layout_width="match_parent"
android:text="@string/about_help_faq"
android:textSize="19sp"
android:layout_marginStart="16dp"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:id="@+id/about"
......
......@@ -106,4 +106,6 @@
<string name="window_dnsrules_refresh_sources">Refresh to import rules from source</string>
<string name="window_querylog_information">Information</string>
<string name="about_help_faq">Frequently asked questions</string>
</resources>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment