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
/* | |
Extension of FragmentStatePagerAdapter which intelligently caches | |
all active fragments and manages the fragment lifecycles. | |
Usage involves extending from SmartFragmentStatePagerAdapter as you would any other PagerAdapter. | |
*/ | |
public abstract class SmartFragmentStatePagerAdapter extends FragmentStatePagerAdapter { | |
// Sparse array to keep track of registered fragments in memory | |
private SparseArray<Fragment> registeredFragments = new SparseArray<Fragment>(); | |
public SmartFragmentStatePagerAdapter(FragmentManager fragmentManager) { |
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
/* | |
* Copyright 2018 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 io.coworkerbox.data.sync | |
import android.content.Context | |
import androidx.core.content.edit | |
import androidx.work.* | |
import io.coworkerbox.BuildConfig | |
import io.coworkerbox.data.ObjectBox | |
import io.coworkerbox.data.Prefs | |
import io.coworkerbox.data.Prefs.PREF_STATE_CITY_VERSION | |
import io.coworkerbox.data.model.City |
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 android.content.Context | |
import android.content.SharedPreferences | |
import android.text.TextUtils | |
class Prefs private constructor(context: Context) { | |
private var sharedPrefs: SharedPreferences | |
private var accessToken: String? = null | |
private var userEmail: String? = null | |
private var userPoints: Int = 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
package app.pasaporte.ui.widget; | |
import android.content.Context; | |
import android.graphics.Path; | |
import android.graphics.RectF; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.util.AttributeSet; | |
import app.pasaporte.ui.widget.shapeofview.ClipPathManager; |