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
<?xml version="1.0" encoding="utf-8"?> | |
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | |
android:color="@color/"rippleColorName"> | |
<item> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |
<corners android:radius="1dp" /> | |
<solid android:color="@color/buttonColorName" /> | |
<corners android:radius="100dp" /> <!--create circle background--> | |
</shape> | |
</item> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_pressed="true" android:drawable="@drawable/btn_pressed"/> | |
<item android:drawable="@drawable/btn_normal"/> | |
</selector> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |
<padding | |
android:bottom="2dp" | |
android:left="2dp" | |
android:right="2dp" | |
android:top="2dp"/> | |
<corners android:radius="3dp"/> | |
<solid android:color="@color/btnNormalColorName"/> | |
</shape> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |
<padding | |
android:bottom="2dp" | |
android:left="2dp" | |
android:right="2dp" | |
android:top="2dp"/> | |
<corners android:radius="3dp"/> | |
<solid android:color="@color/btnPressedColorName"/> | |
</shape> |
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
/** | |
* Factory for creating a tracker and associated graphic to be associated with a new barcode. The | |
* multi-processor uses this factory to create barcode trackers as needed -- one for each barcode. | |
*/ | |
public class BarcodeTrackerFactory implements MultiProcessor.Factory<Barcode> { | |
private GraphicOverlay<BarcodeGraphic> graphicOverlay; | |
Context context; | |
public BarcodeTrackerFactory(GraphicOverlay<BarcodeGraphic> graphicOverlay, | |
Context context) { |
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.scannerapp.ahurwitz.scannerapp.Camera; | |
import android.content.Context; | |
import android.support.annotation.UiThread; | |
import com.google.android.gms.vision.Detector; | |
import com.google.android.gms.vision.Tracker; | |
import com.google.android.gms.vision.barcode.Barcode; | |
/** |
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
import java.util.Arrays; | |
public class HashFunction { | |
String[] theArray; | |
int arraySize; | |
int itemsInArray = 0; | |
public static void main(String[] args) { |
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
VisibleRegion vr = map.getProjection().getVisibleRegion(); | |
double left = vr.latLngBounds.southwest.longitude; | |
double top = vr.latLngBounds.northeast.latitude; | |
double right = vr.latLngBounds.northeast.longitude; | |
double bottom = vr.latLngBounds.southwest.latitude; | |
double center = map.getCameraPosition().target.longitude; | |
Location leftCenterLoc = new Location("left"); | |
leftCenterLoc.setLatitude(map.getCameraPosition().target.latitude); | |
leftCenterLoc.setLongitude(vr.latLngBounds.southwest.longitude); |
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
<animated-vector xmlns:aapt="http://schemas.android.com/aapt" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<aapt:attr name="android:drawable"> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="@dimen/radius_circle" | |
android:height="@dimen/radius_circle" | |
android:viewportHeight="262.0" | |
android:viewportWidth="262.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
private fun initializeFirestoreAdapter() { | |
val config: PagedList.Config = PagedList.Config.Builder() | |
.setEnablePlaceholders(true) | |
.setPrefetchDistance(PREFETCH_DISTANCE) | |
.setPageSize(PAGE_SIZE) | |
.build() | |
val options: FirestorePagingOptions<Content> = FirestorePagingOptions.Builder<Content>() | |
.setLifecycleOwner(this) |