Source: StackOverflow
Answer: Simple way to create an upside down triangle with xml.
Here it is XML for triangle and rectangle. save it inside drawable folder.
triangle.xml
<?xml version="1.0" encoding="utf-8"?>| import android.content.Context; | |
| import android.content.Intent; | |
| import android.support.v4.content.WakefulBroadcastReceiver; | |
| import android.util.Log; | |
| /** | |
| * This is called whenever app receives notification | |
| * in background/foreground state so you can | |
| * apply logic for background task, but still Firebase notification | |
| * will be shown in notification tray |
| For SHA: | |
| keytool -list -v -keystore '/home/../.android/debug.keystore' -alias androiddebugkey -storepass android -keypass android | |
| For Facebook KeyHash: | |
| keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64 | |
| public class ScrollMapView extends MapView { | |
| private final static String TAG = "ScrollMapView"; | |
| public ScrollMapView(Context context) { | |
| super(context); | |
| } | |
| public ScrollMapView(Context context, AttributeSet attributeSet) { | |
| super(context, attributeSet); |
Source: StackOverflow
Answer: Simple way to create an upside down triangle with xml.
Here it is XML for triangle and rectangle. save it inside drawable folder.
triangle.xml
<?xml version="1.0" encoding="utf-8"?>| package com.karconnect.app.utils; | |
| import android.content.Context; | |
| import android.content.DialogInterface; | |
| import android.net.ConnectivityManager; | |
| import android.net.NetworkInfo; | |
| import android.support.v7.app.AlertDialog; | |
| public class NetworkUtils { |
| import android.text.Editable; | |
| import android.text.TextWatcher; | |
| import android.widget.EditText; | |
| public class PhoneNumberTextWatcher implements TextWatcher { | |
| private static final String TAG = "PhoneNumberTextWatcher"; | |
| private EditText editText; |
| byte[] data = { 2, 3, 5, 7, 8, 9, 11, 12, 13 }; | |
| int blockSize = 3; | |
| int blockCount = (data.length + blockSize - 1) / blockSize; | |
| byte[] range = null; | |
| for (int i = 1; i < blockCount; i++) { | |
| int idx = (i - 1) * blockSize; | |
| range = Arrays.copyOfRange(data, idx, idx + blockSize); |
| public static String printKeyHash(Activity context) { | |
| PackageInfo packageInfo; | |
| String key = null; | |
| try { | |
| //getting application package name, as defined in manifest | |
| String packageName = context.getApplicationContext().getPackageName(); | |
| //Retriving package info | |
| packageInfo = context.getPackageManager().getPackageInfo(packageName, | |
| PackageManager.GET_SIGNATURES); |
| /* Copyright 2013 Google Inc. | |
| Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html | |
| Source - https://gist.github.com/broady/6314689 | |
| Video - https://www.youtube.com/watch?v=WKfZsCKSXVQ&feature=youtu.be | |
| */ | |
| package xxx.xxxx.xxxxxx | |
| import com.google.android.gms.maps.model.LatLng; | |
| import com.google.android.gms.maps.model.Marker; |
| import android.util.Log; | |
| import com.appandweb.prjtestdrivendev.BuildConfig; | |
| import com.squareup.okhttp.Interceptor; | |
| import com.squareup.okhttp.Request; | |
| import com.squareup.okhttp.Response; | |
| import com.squareup.okhttp.ResponseBody; | |
| import java.io.IOException; |