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.arcane.coldstorage.application | |
import android.app.Application | |
import com.arcane.coldstoragecache.cache.Cache | |
class Application : Application() { | |
/** | |
* The cache needs to be initialized here allowing the | |
* cache to pull any available data from shared preference and |
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.arcane.coldstorage.cache | |
import android.graphics.Bitmap | |
import android.graphics.BitmapFactory | |
import android.util.Base64 | |
import android.util.Log | |
import com.arcane.coldstoragecache.cache.Cache | |
import java.io.ByteArrayOutputStream | |
import java.net.URL |
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
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme" | |
android:name=".application.Application"> | |
...... your activities go here |
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.arcane.coldstorage | |
import android.graphics.Bitmap | |
import android.os.Bundle | |
import android.view.Menu | |
import android.view.MenuItem | |
import android.widget.Button | |
import android.widget.ImageView | |
import androidx.appcompat.app.AppCompatActivity | |
import com.arcane.coldstorage.cache.ImageCache |
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.arcane.coldstoragecache.converter.impl | |
import android.graphics.Bitmap | |
import android.graphics.BitmapFactory | |
import android.util.Base64 | |
import android.util.Log | |
import com.arcane.coldstoragecache.converter.IConverter | |
/** | |
* An example converter that will convert the stored string |
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"?> | |
<androidx.constraintlayout.widget.ConstraintLayout 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/constraintlayout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity" > | |
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 com.arcane.coldstorageannotation.Refrigerate | |
import java.net.URL | |
class MakeRemoteCall { | |
/** | |
* A method that makes a call to the "https://httpbin.org/get" | |
* endpoint. This endpoint simply returns the arguments that were passed to it. | |
* For the caching logic the parameter passed to the endpoint will act as | |
* the key of the cache. |
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.os.Bundle | |
import android.widget.Button | |
import android.widget.TextView | |
import androidx.appcompat.app.AppCompatActivity | |
import com.arcane.coldstoragecache.callback.OnOperationSuccessfulCallback | |
import com.arcane.coldstorageexamples.remotecall.MakeRemoteCall | |
//WHAT IS THIS ??????????? | |
import com.arcane.generated.GeneratedCacheLayer | |
class MainActivity : AppCompatActivity(), OnOperationSuccessfulCallback<String?> { |
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"?> | |
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<TextView | |
android:id="@+id/remotecall1" |
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"> | |
<!-- selected. This style will be applied when the view is selected --> | |
<item android:state_selected="true"> | |
<shape> | |
<corners android:radius="12dp" /> | |
<solid android:color="@android:color/black" /> | |
</shape> | |
</item> |
OlderNewer