@@ -10,20 +10,24 @@ import androidx.fragment.app.Fragment
10
10
import androidx.navigation.fragment.findNavController
11
11
import com.cyb3rko.logviewerforopenhab.BuildConfig
12
12
import com.cyb3rko.logviewerforopenhab.R
13
- import com.mikepenz.aboutlibraries.LibsBuilder
13
+ // import com.mikepenz.aboutlibraries.LibsBuilder
14
14
import mehdi.sakout.aboutpage.AboutPage
15
15
import mehdi.sakout.aboutpage.Element
16
16
17
17
class AboutFragment : Fragment () {
18
18
19
19
override fun onCreateView (inflater : LayoutInflater , container : ViewGroup ? , savedInstanceState : Bundle ? ): View ? {
20
+ val githubIcon = mehdi.sakout.aboutpage.R .drawable.about_icon_github
21
+ val emailIcon = mehdi.sakout.aboutpage.R .drawable.about_icon_email
22
+ val instagramIcon = mehdi.sakout.aboutpage.R .drawable.about_icon_instagram
23
+ val instagramColor = mehdi.sakout.aboutpage.R .color.about_instagram_color
20
24
21
25
return AboutPage (context)
22
26
.setImage(R .mipmap.ic_launcher_foreground)
23
27
.setDescription(getString(R .string.about_description))
24
28
.addItem(
25
29
Element ().setTitle(String .format(getString(R .string.about_element_version), BuildConfig .VERSION_NAME , BuildConfig .VERSION_CODE ))
26
- .setIconDrawable(R .drawable.about_icon_github ).setOnClickListener(showChangelog())
30
+ .setIconDrawable(githubIcon ).setOnClickListener(showChangelog())
27
31
)
28
32
.addGroup(getString(R .string.about_group_legal))
29
33
.addItem(
@@ -39,20 +43,20 @@ class AboutFragment : Fragment() {
39
43
)
40
44
.addGroup(getString(R .string.about_group_connect))
41
45
.addItem(
42
- Element ().setTitle(getString(R .string.about_element_feedback_text)).setIconDrawable(R .drawable.about_icon_github )
46
+ Element ().setTitle(getString(R .string.about_element_feedback_text)).setIconDrawable(githubIcon )
43
47
.setOnClickListener(openGithubFeedback())
44
48
)
45
49
.addItem(
46
- Element ().setTitle(getString(R .string.about_element_email_text)).setIconDrawable(R .drawable.about_icon_email )
50
+ Element ().setTitle(getString(R .string.about_element_email_text)).setIconDrawable(emailIcon )
47
51
.setOnClickListener(writeEmail())
48
52
)
49
53
.addItem(
50
54
Element ().setTitle(getString(R .string.about_element_github_text))
51
- .setIconDrawable(R .drawable.about_icon_github ).setOnClickListener(openGithubProfile())
55
+ .setIconDrawable(githubIcon ).setOnClickListener(openGithubProfile())
52
56
)
53
57
.addItem(
54
- Element ().setTitle(getString(R .string.about_element_instagram_text)).setIconDrawable(R .drawable.about_icon_instagram )
55
- .setIconTint(R .color.about_instagram_color ).setOnClickListener(openInstaPage())
58
+ Element ().setTitle(getString(R .string.about_element_instagram_text)).setIconDrawable(instagramIcon )
59
+ .setIconTint(instagramColor ).setOnClickListener(openInstaPage())
56
60
)
57
61
.create()
58
62
}
@@ -63,21 +67,21 @@ class AboutFragment : Fragment() {
63
67
64
68
private fun showLibraries (): View .OnClickListener {
65
69
return View .OnClickListener {
66
- context?.let { trueContext ->
67
- LibsBuilder ()
68
- .withShowLoadingProgress(true )
69
- .withAboutVersionShownCode(false )
70
- .withAboutVersionShownName(false )
71
- .withAutoDetect(true )
72
- .withAboutIconShown(false )
73
- .withAboutVersionShown(false )
74
- .withVersionShown(true )
75
- .withLicenseDialog(true )
76
- .withLicenseShown(true )
77
- .withCheckCachedDetection(true )
78
- .withSortEnabled(true )
79
- .start(trueContext)
80
- }
70
+ // context?.let { trueContext ->
71
+ // LibsBuilder()
72
+ // .withShowLoadingProgress(true)
73
+ // .withAboutVersionShownCode(false)
74
+ // .withAboutVersionShownName(false)
75
+ // .withAutoDetect(true)
76
+ // .withAboutIconShown(false)
77
+ // .withAboutVersionShown(false)
78
+ // .withVersionShown(true)
79
+ // .withLicenseDialog(true)
80
+ // .withLicenseShown(true)
81
+ // .withCheckCachedDetection(true)
82
+ // .withSortEnabled(true)
83
+ // .start(trueContext)
84
+ // }
81
85
}
82
86
}
83
87
0 commit comments