Skip to content

Commit

Permalink
actions: less warnings is more (fixes #3764) (#3765)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
ewhang5 and dogi authored Jul 3, 2024
1 parent f442554 commit 40d20bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1653
versionName "0.16.53"
versionCode 1654
versionName "0.16.54"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package org.ole.planet.myplanet.ui.helpwanted

import android.content.Context
import android.content.SharedPreferences
import android.os.Build
import android.os.Bundle
import android.text.Html
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.annotation.RequiresApi
import androidx.core.text.HtmlCompat
import androidx.fragment.app.Fragment
import com.google.gson.JsonObject
import com.google.gson.JsonParser.parseString
Expand All @@ -26,16 +29,17 @@ class HelpWantedFragment : Fragment() {
return fragmentHelpWantedBinding.root
}

@RequiresApi(Build.VERSION_CODES.N)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val boldName = "<b>" + getString(R.string.name_colon) + "</b>"
val boldEmail = "<b>" + getString(R.string.email_colon) + "</b>"
val boldPhone = "<b>" + getString(R.string.phone_number_colon) + "</b>"
if (manager != null) {
fragmentHelpWantedBinding.llData.visibility = View.VISIBLE
fragmentHelpWantedBinding.tvName.text = Html.fromHtml(boldName + getString("name", manager))
fragmentHelpWantedBinding.tvEmail.text = Html.fromHtml(boldEmail + getString("name", manager))
fragmentHelpWantedBinding.tvPhone.text = Html.fromHtml(boldPhone + getString("phoneNumber", manager))
fragmentHelpWantedBinding.tvName.text = Html.fromHtml(boldName + getString("name", manager), HtmlCompat.FROM_HTML_MODE_LEGACY)
fragmentHelpWantedBinding.tvEmail.text = Html.fromHtml(boldEmail + getString("name", manager), HtmlCompat.FROM_HTML_MODE_LEGACY)
fragmentHelpWantedBinding.tvPhone.text = Html.fromHtml(boldPhone + getString("phoneNumber", manager), HtmlCompat.FROM_HTML_MODE_LEGACY)
} else {
fragmentHelpWantedBinding.llData.visibility = View.GONE
fragmentHelpWantedBinding.tvNodata.setText(R.string.no_data_available)
Expand Down

0 comments on commit 40d20bc

Please sign in to comment.