-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Gideon Okuro <[email protected]> Co-authored-by: dogi <[email protected]>
- Loading branch information
1 parent
94c4a6b
commit 29f0f0d
Showing
3 changed files
with
15 additions
and
7 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
14 changes: 10 additions & 4 deletions
14
app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DisclaimerFragment.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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package org.ole.planet.myplanet.ui.dashboard | ||
|
||
import android.os.Bundle | ||
import android.text.Html | ||
import android.text.method.LinkMovementMethod | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.core.text.HtmlCompat | ||
import androidx.fragment.app.Fragment | ||
import org.ole.planet.myplanet.R | ||
import org.ole.planet.myplanet.databinding.FragmentDisclaimerBinding | ||
import org.ole.planet.myplanet.utilities.Constants | ||
|
||
class DisclaimerFragment : Fragment() { | ||
private lateinit var fragmentDisclaimerBinding: FragmentDisclaimerBinding | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { | ||
fragmentDisclaimerBinding = FragmentDisclaimerBinding.inflate(inflater, container, false) | ||
fragmentDisclaimerBinding.tvDisclaimer.text = Html.fromHtml(getString(Constants.DISCLAIMER), HtmlCompat.FROM_HTML_MODE_LEGACY) | ||
return fragmentDisclaimerBinding.root | ||
} | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
fragmentDisclaimerBinding.tvDisclaimer.text = HtmlCompat.fromHtml(getString(R.string.disclaimer), HtmlCompat.FROM_HTML_MODE_LEGACY) | ||
fragmentDisclaimerBinding.tvDisclaimer.movementMethod = LinkMovementMethod.getInstance() | ||
} | ||
} |
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