For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Functional interface for binding data to a view | |
*/ | |
public interface ViewBinder<V extends View> { | |
void bindView(V view, ViewItem<V> item); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.reactivex.Observable | |
import io.reactivex.Observer | |
import io.reactivex.disposables.Disposable | |
import io.reactivex.schedulers.Schedulers | |
fun main(args: Array<String>) { | |
val data: MutableList<String> = mutableListOf("Andi", "Beni", "Deni", "Fani", "Gita") // Sumber data | |
val observer = object : Observer<MutableList<String>> { // Membuat observer | |
override fun onNext(p0: MutableList<String>) { | |
// Do something |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.reactivex.Observable | |
import io.reactivex.Observer | |
import io.reactivex.disposables.Disposable | |
import io.reactivex.schedulers.Schedulers | |
fun main(args: Array<String>) { | |
val data: MutableList<String> = mutableListOf("Andi", "Beni", "Deni", "Fani", "Gita") | |
Observable | |
.just(data) | |
.observeOn(Schedulers.io()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout android:id="@+id/main_root" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context="com.wisnu.uicomponent.MainActivity"> | |
<EditText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linearLayout { | |
orientation = LinearLayout.VERTICAL | |
editText { | |
hint = "Name" | |
}.lparams(width = matchParent, height = wrapContent) | |
button("Say Hello") { | |
}.lparams(width = matchParent, height = wrapContent) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linearLayout { | |
orientation = LinearLayout.VERTICAL | |
val myEdt = editText { | |
hint = "Name" | |
}.lparams(width = matchParent, height = wrapContent) | |
button("Say Hello") { | |
onClick { | |
val message = if (myEdt.text.toString().isBlank()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCustomTextView(ctx: Context) : MyCustomTextView(ctx), TextView | |
inline fun ViewManager.myCustomTextView(init: MyCustomTextView.() -> Unit = {})= ankoView({ MyCustomTextView(it) }, theme = 0, init) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
apply from: './flavors.gradle' | |
... | |
android { | |
buildTypes { | |
productFlavors { | |
project.flavors.each { flavor, config -> | |
"$flavor" { | |
dimension 'scope' | |
if (flavor != 'full') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/306xxjtg7uz13v0/306/306_hd_javascript_for_automation.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/404xxdxsstkaqjb/404/404_hd_advanced_swift.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/701xx8n8ca3aq4j/701/701_hd_designing_accessories_for_ios_and_os_x.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/224xxxlsvigdoc0/224/224_hd_core_os_ios_application_architectural_patterns.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/717xxux5eg6f9v4/717/717_hd_kids_and_apps.mov | |
http://devstreaming.apple.com/videos/wwdc/2014/716xx8q4shlqcp8/716/ |