mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-03 05:03:04 +00:00
decrease lint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
ffdc630b76
commit
60827afe5c
@ -19,6 +19,7 @@ import android.widget.ImageView
|
|||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.emoji.widget.EmojiTextView
|
import androidx.emoji.widget.EmojiTextView
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
@ -122,8 +123,8 @@ class IncomingLocationMessageViewHolder(incomingView: View) : MessageHolders
|
|||||||
// do nothing, avatar is set
|
// do nothing, avatar is set
|
||||||
} else if (message.actorType == "bots" && message.actorId == "changelog") {
|
} else if (message.actorType == "bots" && message.actorId == "changelog") {
|
||||||
val layers = arrayOfNulls<Drawable>(2)
|
val layers = arrayOfNulls<Drawable>(2)
|
||||||
layers[0] = context?.getDrawable(R.drawable.ic_launcher_background)
|
layers[0] = AppCompatResources.getDrawable(context!!, R.drawable.ic_launcher_background)
|
||||||
layers[1] = context?.getDrawable(R.drawable.ic_launcher_foreground)
|
layers[1] = AppCompatResources.getDrawable(context!!, R.drawable.ic_launcher_foreground)
|
||||||
val layerDrawable = LayerDrawable(layers)
|
val layerDrawable = LayerDrawable(layers)
|
||||||
messageUserAvatarView?.setImageDrawable(DisplayUtils.getRoundedDrawable(layerDrawable))
|
messageUserAvatarView?.setImageDrawable(DisplayUtils.getRoundedDrawable(layerDrawable))
|
||||||
} else if (message.actorType == "bots") {
|
} else if (message.actorType == "bots") {
|
||||||
|
@ -17,6 +17,7 @@ import android.widget.ImageView
|
|||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.emoji.widget.EmojiTextView
|
import androidx.emoji.widget.EmojiTextView
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
@ -203,7 +204,7 @@ class OutcomingLocationMessageViewHolder(incomingView: View) : MessageHolders
|
|||||||
}
|
}
|
||||||
|
|
||||||
readStatusDrawableInt?.let { drawableInt ->
|
readStatusDrawableInt?.let { drawableInt ->
|
||||||
context?.resources?.getDrawable(drawableInt, null)?.let {
|
AppCompatResources.getDrawable(context!!, drawableInt)?.let {
|
||||||
it.setColorFilter(context?.resources!!.getColor(R.color.white60), PorterDuff.Mode.SRC_ATOP)
|
it.setColorFilter(context?.resources!!.getColor(R.color.white60), PorterDuff.Mode.SRC_ATOP)
|
||||||
checkMark?.setImageDrawable(it)
|
checkMark?.setImageDrawable(it)
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ class LocationPickerController(args: Bundle) : BaseController(args), SearchView.
|
|||||||
myLocation = GeoPoint(13.0, 52.0)
|
myLocation = GeoPoint(13.0, 52.0)
|
||||||
|
|
||||||
var zoomToCurrentPositionAllowed = !receivedChosenGeocodingResult
|
var zoomToCurrentPositionAllowed = !receivedChosenGeocodingResult
|
||||||
locationOverlay.runOnFirstFix(Runnable {
|
locationOverlay.runOnFirstFix {
|
||||||
myLocation = locationOverlay.myLocation
|
myLocation = locationOverlay.myLocation
|
||||||
if (zoomToCurrentPositionAllowed) {
|
if (zoomToCurrentPositionAllowed) {
|
||||||
activity!!.runOnUiThread {
|
activity!!.runOnUiThread {
|
||||||
@ -246,16 +246,16 @@ class LocationPickerController(args: Bundle) : BaseController(args), SearchView.
|
|||||||
mapController?.setCenter(myLocation)
|
mapController?.setCenter(myLocation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
if (receivedChosenGeocodingResult && geocodedLat != 0.0 && geocodedLon != 0.0) {
|
if (receivedChosenGeocodingResult && geocodedLat != 0.0 && geocodedLon != 0.0) {
|
||||||
mapController?.setCenter(GeoPoint(geocodedLat, geocodedLon))
|
mapController?.setCenter(GeoPoint(geocodedLat, geocodedLon))
|
||||||
}
|
}
|
||||||
|
|
||||||
btCenterMap?.setOnClickListener(View.OnClickListener {
|
btCenterMap?.setOnClickListener {
|
||||||
mapController?.animateTo(myLocation)
|
mapController?.animateTo(myLocation)
|
||||||
moveToCurrentLocationWasClicked = true
|
moveToCurrentLocationWasClicked = true
|
||||||
})
|
}
|
||||||
|
|
||||||
map?.addMapListener(DelayedMapListener(object : MapListener {
|
map?.addMapListener(DelayedMapListener(object : MapListener {
|
||||||
override fun onScroll(paramScrollEvent: ScrollEvent): Boolean {
|
override fun onScroll(paramScrollEvent: ScrollEvent): Boolean {
|
||||||
@ -422,7 +422,7 @@ class LocationPickerController(args: Bundle) : BaseController(args), SearchView.
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "LocationPickerController"
|
private const val TAG = "LocationPicker"
|
||||||
private val REQUEST_PERMISSIONS_REQUEST_CODE = 1
|
private const val REQUEST_PERMISSIONS_REQUEST_CODE = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,8 @@ buildscript {
|
|||||||
configurations.all {
|
configurations.all {
|
||||||
// check for updates every build
|
// check for updates every build
|
||||||
resolutionStrategy.cacheChangingModulesFor 3600, 'seconds'
|
resolutionStrategy.cacheChangingModulesFor 3600, 'seconds'
|
||||||
|
exclude module: 'httpclient'
|
||||||
|
exclude module: 'commons-logging'
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
Loading…
Reference in New Issue
Block a user