This file contains 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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<polymer-element name="my-element"> |
This file contains 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
SupportMapFragment mapFragment; | |
if (savedInstanceState == null) { | |
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); | |
Criteria cri = new Criteria(); | |
String bbb = locationManager.getBestProvider(cri, true); | |
Location myLocation = locationManager.getLastKnownLocation(bbb); | |
if (myLocation != null) { | |
LatLng ll = new LatLng(myLocation.getLatitude(), myLocation.getLongitude()); |
This file contains 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
package com.worldline.evasdk.view.widget; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Color; | |
import android.graphics.drawable.Drawable; | |
import android.support.v4.view.ViewCompat; | |
import android.util.AttributeSet; | |
import android.view.LayoutInflater; | |
import android.view.View; |
This file contains 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
jdbcjbdg |
This file contains 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
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:card_view="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:card="http://schemas.android.com/apk/res-auto" | |
android:layout_gravity="center" | |
android:layout_width="match_parent" | |
android:layout_height="180dp" | |
android:background="@color/white" | |
card_view:cardCornerRadius="4dp" | |
android:clickable="true" |
This file contains 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
ScheduledExecutorService executorService = Executors.newScheduledThreadPool(5); | |
executorService.scheduleAtFixedRate(runnable, 0, 5, TimeUnit.SECONDS); |
This file contains 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
private int fetchPrimaryColor() { | |
int colorAccent = Color.parseColor("#FF0000"); | |
int attr = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ? android.R.attr.colorPrimary : R.attr.colorPrimary; | |
TypedArray a = getContext().getTheme().obtainStyledAttributes(new int[]{attr}); | |
colorAccent = a.getColor(0, colorAccent); | |
a.recycle(); | |
return colorAccent; |
This file contains 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
/** | |
* returns true if mock location enabled, false if not enabled. | |
*/ | |
public static boolean isMockSettingsON(Context context) { | |
return !Settings.Secure.getString(context.getContentResolver(), | |
Settings.Secure.ALLOW_MOCK_LOCATION).equals("0"); | |
} |
This file contains 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
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/coordinator" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appbarLayout" | |
android:layout_width="match_parent" |