Misc refinements

* Refine Kotlin codes;
* Support RTL;
* Use VectorDrawable for notification;
* Remove redundant resources;
* Better IDE integration.
This commit is contained in:
Mygod
2017-12-06 19:46:26 -08:00
parent f49d3cb443
commit c124e1e8ef
34 changed files with 151 additions and 132 deletions
@@ -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
*/