Misc refinements
* Refine Kotlin codes; * Support RTL; * Use VectorDrawable for notification; * Remove redundant resources; * Better IDE integration.
This commit is contained in:
@@ -9,6 +9,7 @@ import android.support.v4.app.Fragment
|
||||
import android.support.v4.app.FragmentManager
|
||||
import android.support.v7.util.SortedList
|
||||
import android.util.DisplayMetrics
|
||||
import android.util.TypedValue
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.view.Window
|
||||
@@ -77,6 +78,8 @@ fun Toast.position(view: View, window: Window, offsetX: Int = 0, offsetY: Int =
|
||||
return this
|
||||
}
|
||||
|
||||
fun Float.dp(): Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, this, app.resources.displayMetrics)
|
||||
|
||||
/**
|
||||
* Based on: https://stackoverflow.com/a/15656428/2245107
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user