@@ -16,13 +16,11 @@ import androidx.compose.foundation.layout.fillMaxWidth
1616import androidx.compose.foundation.layout.padding
1717import androidx.compose.foundation.layout.size
1818import androidx.compose.foundation.layout.wrapContentHeight
19- import androidx.compose.foundation.layout.wrapContentWidth
2019import androidx.compose.runtime.remember
2120import androidx.compose.ui.Modifier
2221import androidx.compose.ui.platform.ComposeView
2322import androidx.compose.ui.platform.LocalContext
2423import androidx.compose.ui.res.painterResource
25- import androidx.compose.ui.text.style.TextAlign
2624import androidx.compose.ui.unit.dp
2725import androidx.fragment.app.Fragment
2826import androidx.navigation.fragment.findNavController
@@ -73,21 +71,27 @@ class AboutFragment : Fragment() {
7371
7472 setVersionText(view)
7573
76- setAuthorsText (view)
74+ setAuthorsLabel (view)
7775
7876 setAuthorOne(view)
7977
8078 setAuthorTwo(view)
8179
82- setLicenseText (view)
80+ setLicenseLabel (view)
8381
84- setLicense (view)
82+ setLicenseText (view)
8583
8684 setAboutProjectTitle(view)
8785
86+ setWebsiteLabel(view)
87+
8888 setWebsiteText(view)
8989
90- setWebsite(view)
90+ setForumLabel(view)
91+
92+ setForumText(view)
93+
94+ setLibrariesTitle(view)
9195
9296 val versionLayout = view.findViewById<View >(R .id.versionLayout)
9397 versionLayout.setOnClickListener { displayChangeLog() }
@@ -213,7 +217,7 @@ class AboutFragment : Fragment() {
213217 themeProvider.WithTheme {
214218 val context = LocalContext .current
215219 TextTitleSmall (
216- text = context.getString(R .string.about_title,appNameProvider.appName),
220+ text = context.getString(R .string.about_title, appNameProvider.appName),
217221 modifier = Modifier
218222 .fillMaxWidth()
219223 .padding(
@@ -222,7 +226,7 @@ class AboutFragment : Fragment() {
222226 top = 16 .dp,
223227 bottom = 8 .dp,
224228 ),
225- color = MainTheme .colors.secondary
229+ color = MainTheme .colors.secondary,
226230 )
227231 }
228232 }
@@ -259,7 +263,7 @@ class AboutFragment : Fragment() {
259263 }
260264 }
261265
262- private fun setAuthorsText (view : View ) {
266+ private fun setAuthorsLabel (view : View ) {
263267 val authorsLabel = view.findViewById<ComposeView >(R .id.authorsLabel)
264268 authorsLabel.setContent {
265269 val context = LocalContext .current
@@ -307,7 +311,7 @@ class AboutFragment : Fragment() {
307311 }
308312 }
309313
310- private fun setLicenseText (view : View ) {
314+ private fun setLicenseLabel (view : View ) {
311315 val licenseLabel = view.findViewById<ComposeView >(R .id.licenseLabel)
312316 licenseLabel.setContent {
313317 val context = LocalContext .current
@@ -323,7 +327,7 @@ class AboutFragment : Fragment() {
323327 }
324328 }
325329
326- private fun setLicense (view : View ) {
330+ private fun setLicenseText (view : View ) {
327331 val license = view.findViewById<ComposeView >(R .id.license)
328332 license.setContent {
329333 val context = LocalContext .current
@@ -356,7 +360,7 @@ class AboutFragment : Fragment() {
356360 }
357361 }
358362
359- private fun setWebsiteText (view : View ) {
363+ private fun setWebsiteLabel (view : View ) {
360364 val websiteLabel = view.findViewById<ComposeView >(R .id.websiteLabel)
361365 websiteLabel.setContent {
362366 val context = LocalContext .current
@@ -372,7 +376,7 @@ class AboutFragment : Fragment() {
372376 }
373377 }
374378
375- private fun setWebsite (view : View ) {
379+ private fun setWebsiteText (view : View ) {
376380 val website = view.findViewById<ComposeView >(R .id.website)
377381 website.setContent {
378382 val context = LocalContext .current
@@ -388,6 +392,55 @@ class AboutFragment : Fragment() {
388392 }
389393 }
390394
395+ private fun setForumLabel (view : View ) {
396+ val forumLabel = view.findViewById<ComposeView >(R .id.user_forum_label)
397+ forumLabel.setContent {
398+ val context = LocalContext .current
399+ themeProvider.WithTheme {
400+ TextTitleMedium (
401+ text = context.getString(R .string.user_forum_title),
402+ modifier = Modifier
403+ .fillMaxWidth()
404+ .wrapContentHeight(),
405+ color = MainTheme .colors.secondary,
406+ )
407+ }
408+ }
409+ }
410+
411+ private fun setForumText (view : View ) {
412+ val forum = view.findViewById<ComposeView >(R .id.user_forum)
413+ forum.setContent {
414+ val context = LocalContext .current
415+ themeProvider.WithTheme {
416+ TextBodyMedium (
417+ text = context.getString(R .string.user_forum_url),
418+ modifier = Modifier
419+ .fillMaxWidth()
420+ .wrapContentHeight(),
421+ color = MainTheme .colors.secondary,
422+ )
423+ }
424+ }
425+ }
426+
427+ private fun setLibrariesTitle (view : View ) {
428+ val librariesTitle = view.findViewById<ComposeView >(R .id.librariesTitle)
429+ librariesTitle.setContent {
430+ val context = LocalContext .current
431+ themeProvider.WithTheme {
432+ TextTitleSmall (
433+ text = context.getString(R .string.about_libraries),
434+ modifier = Modifier
435+ .fillMaxWidth()
436+ .wrapContentHeight()
437+ .padding(top = 16 .dp, bottom = 8 .dp, start = 16 .dp, end = 16 .dp),
438+ color = MainTheme .colors.secondary,
439+ )
440+ }
441+ }
442+ }
443+
391444 private fun displayChangeLog () {
392445 findNavController().navigate(R .id.action_aboutScreen_to_changelogScreen)
393446 }
0 commit comments