android:clickable="true"
android:background="?attr/selectableItemBackground"
or
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/* | |
IoT Manager mqtt device client https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager | |
Based on Basic MQTT example with Authentication | |
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
- connects to an MQTT server, providing userdescr and password | |
- publishes config to the topic "/IoTmanager/config/deviceID/" | |
- subscribes to the topic "/IoTmanager/hello" ("hello" messages from mobile device) | |
Tested with Arduino IDE 1.6.6 + ESP8266 Community Edition v 2.0.0-stable and PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
ESP8266 Community Edition v 2.0.0-stable have some HTTPS issues. Push notification temporary disabled. |
Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.
I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).
import android.os.Handler; | |
import android.os.Looper; | |
import android.support.annotation.NonNull; | |
import android.util.Log; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.net.ProtocolException; | |
import java.util.HashMap; |
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Provide links to all related tasks | |
# Example: https://example.com/#/tasks/1234 | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any other relevant issues, articles or other resources |
class Logger { | |
private static __ENABLED__ == true; // use something like webpack-provider-plugin to inject __ENABLED__ | |
private static doLog = (fun: string, ...args: any[]) => { | |
if (!Logger.__ENABLED__) { return; } | |
console[fun]?.bind(console)(...args); | |
} |