mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Merge pull request #2742 from Bnyro/master
Rename the Community section to Help and add a FAQ
This commit is contained in:
commit
1aa6ab9bd3
@ -44,7 +44,7 @@
|
||||
android:label="@string/settings" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.activities.CommunityActivity"
|
||||
android:name=".ui.activities.HelpActivity"
|
||||
android:label="@string/settings" />
|
||||
|
||||
<activity
|
||||
|
@ -13,6 +13,7 @@ const val GITHUB_URL = "https://github.com/libre-tube/LibreTube"
|
||||
const val PIPED_GITHUB_URL = "https://github.com/TeamPiped/Piped"
|
||||
const val WEBLATE_URL = "https://hosted.weblate.org/projects/libretube/libretube/"
|
||||
const val LICENSE_URL = "https://gnu.org/"
|
||||
const val FAQ_URL = "https://libre-tube.github.io/#faq"
|
||||
|
||||
/**
|
||||
* Social media links for the community fragment
|
||||
|
@ -4,34 +4,39 @@ import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import com.github.libretube.constants.DISCORD_URL
|
||||
import com.github.libretube.constants.FAQ_URL
|
||||
import com.github.libretube.constants.MATRIX_URL
|
||||
import com.github.libretube.constants.REDDIT_URL
|
||||
import com.github.libretube.constants.TELEGRAM_URL
|
||||
import com.github.libretube.constants.TWITTER_URL
|
||||
import com.github.libretube.databinding.ActivityCommunityBinding
|
||||
import com.github.libretube.databinding.ActivityHelpBinding
|
||||
import com.github.libretube.ui.base.BaseActivity
|
||||
|
||||
class CommunityActivity : BaseActivity() {
|
||||
private lateinit var binding: ActivityCommunityBinding
|
||||
class HelpActivity : BaseActivity() {
|
||||
private lateinit var binding: ActivityHelpBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
binding = ActivityCommunityBinding.inflate(layoutInflater)
|
||||
binding = ActivityHelpBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
binding.toolbar.setNavigationOnClickListener {
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
}
|
||||
|
||||
binding.telegram.setOnClickListener {
|
||||
openLinkFromHref(TELEGRAM_URL)
|
||||
binding.faq.setOnClickListener {
|
||||
openLinkFromHref(FAQ_URL)
|
||||
}
|
||||
|
||||
binding.matrix.setOnClickListener {
|
||||
openLinkFromHref(MATRIX_URL)
|
||||
}
|
||||
|
||||
binding.telegram.setOnClickListener {
|
||||
openLinkFromHref(TELEGRAM_URL)
|
||||
}
|
||||
|
||||
binding.discord.setOnClickListener {
|
||||
openLinkFromHref(DISCORD_URL)
|
||||
}
|
@ -359,9 +359,9 @@ class MainActivity : BaseActivity() {
|
||||
startActivity(aboutIntent)
|
||||
true
|
||||
}
|
||||
R.id.action_community -> {
|
||||
val communityIntent = Intent(this, CommunityActivity::class.java)
|
||||
startActivity(communityIntent)
|
||||
R.id.action_help -> {
|
||||
val helpIntent = Intent(this, HelpActivity::class.java)
|
||||
startActivity(helpIntent)
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
|
11
app/src/main/res/drawable/ic_help.xml
Normal file
11
app/src/main/res/drawable/ic_help.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z" />
|
||||
</vector>
|
@ -26,18 +26,18 @@
|
||||
app:shapeAppearance="@style/CircleImageView" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/telegram"
|
||||
android:id="@+id/faq"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout style="@style/AboutItem">
|
||||
|
||||
<ImageView
|
||||
style="@style/AboutImageView"
|
||||
android:src="@drawable/ic_telegram" />
|
||||
android:src="@drawable/ic_help" />
|
||||
|
||||
<TextView
|
||||
style="@style/AboutTextView"
|
||||
android:text="@string/telegram" />
|
||||
android:text="@string/faq" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -61,6 +61,24 @@
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/telegram"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout style="@style/AboutItem">
|
||||
|
||||
<ImageView
|
||||
style="@style/AboutImageView"
|
||||
android:src="@drawable/ic_telegram" />
|
||||
|
||||
<TextView
|
||||
style="@style/AboutTextView"
|
||||
android:text="@string/telegram" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/discord"
|
||||
style="@style/AboutCard">
|
@ -16,8 +16,8 @@
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_community"
|
||||
android:title="@string/community"
|
||||
android:id="@+id/action_help"
|
||||
android:title="@string/help"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
|
@ -442,6 +442,8 @@
|
||||
<string name="audio_only_mode_summary">Turn LibreTube into a music player.</string>
|
||||
<string name="sleep_timer">Sleep timer</string>
|
||||
<string name="skip_silence">Skip silence</string>
|
||||
<string name="help">Help</string>
|
||||
<string name="faq">FAQ</string>
|
||||
|
||||
<!-- Notification channel strings -->
|
||||
<string name="download_channel_name">Download Service</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user