This is a simple wrapper View for the new TextInputLayout from Design Library.
Normaly you use the TextInputLayout like this
| <?php | |
| // API access key from Google API's Console | |
| // It's a Server-Key | |
| define( 'API_ACCESS_KEY', 'YOUR_API_ACCESS_KEY' ); | |
| $registrationIds = array("DEVICE_REGISTRATION_IDS" ); | |
| // prep the bundle | |
| $msg = array | |
| ( |
| try: | |
| # Specify the url | |
| url = 'https://android.googleapis.com/gcm/send' | |
| # Setup the data to send | |
| data = json.dumps({ "registration_ids" : [""+ USER_GCM_IDS +""], "data" : { "question" : data.question, "questionDetail" : data.questionDetail, "answerFormat" : data.answerFormat, "dateend" : str(data.dateend), "image" : data.image} }) | |
| # Add header | |
| headers = {'Content-Type' : 'application/json', 'Authorization' : 'key=API_ACCESS_KEY'} |
This is a simple wrapper View for the new TextInputLayout from Design Library.
Normaly you use the TextInputLayout like this
This is a simple how to make a network request with the SearchView implemented in a Toolbar.
The documentation for a Search Interface says that you can't make a a request over the network. You can only make a SearchView via recent searches or over a ContentProvider. I want to demonstrate how to make network request with the searchview.
Just a simple example of protecting some passwords via the Proxy Pattern
--
| images=($(find . -iname '*.png' -o -iname '*.jpg')) | |
| for image in "${images[@]}"; do | |
| webp_file_path="${image::${#image}-4}.webp" | |
| echo "Convert ${image} to ${webp_file_path}" | |
| $(./cwebp-5.1 -quiet "${image}" -o "${webp_file_path}") | |
| rm "${image}" | |
| done |