Skip to content

Commit

Permalink
all: less build: warnings is more (fixes #4820) (#4823)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <dogi@users.noreply.github.com>
  • Loading branch information
Okuro3499 and dogi authored Dec 2, 2024
1 parent 53d0cf6 commit d9f25fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2116
versionName "0.21.16"
versionCode 2117
versionName "0.21.17"
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 @@ -189,7 +189,7 @@ class TakeExamFragment : BaseExamFragment(), View.OnClickListener, CompoundButto
if (isRadio) {
fragmentTakeExamBinding.groupChoices.addView(rdBtn)
} else {
rdBtn.setTextColor(resources.getColor(R.color.daynight_textColor))
rdBtn.setTextColor(ContextCompat.getColor(requireContext(), R.color.daynight_textColor))
rdBtn.buttonTintList = ContextCompat.getColorStateList(requireContext(), R.color.daynight_textColor)
fragmentTakeExamBinding.llCheckbox.addView(rdBtn)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.RecyclerView
import io.realm.Realm
Expand Down Expand Up @@ -81,10 +82,10 @@ class AdapterMyLife(private val context: Context, private val myLifeList: List<R
it, myLifeList[position].userId)
}
}, {
Handler(Looper.getMainLooper()).post {
if (isVisible) {
changeVisibility(holder, R.drawable.ic_visibility, hide)
Utilities.toast(context, myLifeList[position].title + context.getString(R.string.is_now_hidden))
Handler(Looper.getMainLooper()).post {
if (isVisible) {
changeVisibility(holder, R.drawable.ic_visibility, hide)
Utilities.toast(context, myLifeList[position].title + context.getString(R.string.is_now_hidden))
} else {
changeVisibility(holder, R.drawable.ic_visibility_off, show)
Utilities.toast(context, myLifeList[position].title + context.getString(R.string.is_now_shown))
Expand Down Expand Up @@ -120,11 +121,11 @@ class AdapterMyLife(private val context: Context, private val myLifeList: List<R
var rvItemContainer: LinearLayout = itemView.findViewById(R.id.rv_item_parent_layout)

override fun onItemSelected() {
itemView.setBackgroundColor(context.resources.getColor(R.color.user_profile_background))
itemView.setBackgroundColor(ContextCompat.getColor(context, R.color.user_profile_background))
}

override fun onItemClear(viewHolder: RecyclerView.ViewHolder?) {
itemView.setBackgroundColor(context.resources.getColor(R.color.daynight_grey))
itemView.setBackgroundColor(ContextCompat.getColor(context, R.color.daynight_grey))
if (viewHolder != null) {
if (!myLifeList[viewHolder.bindingAdapterPosition].isVisible) {
(viewHolder as ViewHolderMyLife?)?.rvItemContainer?.alpha = hide
Expand Down

0 comments on commit d9f25fd

Please sign in to comment.