View non_rote_split.tsx
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 React , {useState,lazy} from "react"; | |
import Button from "./button"; | |
const DialogBox = lazy(() => import("./dialogBox")); | |
const MyComponent = () => { | |
const [showDialogBox, setShowDialogBox] = useState(false); | |
return( | |
<div> | |
<React.Suspense fallback={"loading"} /> |
View app_route_split.tsx
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 React , {lazy , Suspense} from "react"; | |
import { Route, Switch } from "react-router-dom"; | |
const Home = lazy(() => | |
import("./home" /* webpackChunkName: "HomePage" */) | |
); | |
const Login = lazy(() => | |
import("./login" /* webpackChunkName: "LoginPage" */) | |
); |
View app.tsx
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 React from "react"; | |
import { Route, Switch } from "react-router-dom"; | |
import Home from "./home"; | |
import Login from "./login"; | |
import Profile from "./profile"; | |
const MyComponent = () => { | |
return ( | |
<Switch> | |
<Route path="/home"> |
View load_image_fragment.kt
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.coldstorageexamples.fragment | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import android.widget.ImageView | |
import androidx.fragment.app.Fragment | |
import com.arcane.coldstorageannotation.LoadImage | |
import com.arcane.coldstoragecache.cache.Cache |
View load_image_activity_code.kt
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.coldstorageexamples.activity | |
import android.os.Bundle | |
import android.widget.ImageView | |
import androidx.appcompat.app.AppCompatActivity | |
import com.arcane.coldstorageannotation.LoadImage | |
import com.arcane.coldstoragecache.cache.Cache | |
import com.arcane.coldstorageexamples.R | |
class LoadImageExampleActivity : AppCompatActivity() { |
View fragment_layout.xml
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/linearLayout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:id="@+id/image_2" |
View load_image_activity_lauout.xml
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/linearLayout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:id="@+id/image_1" |
View freeze_example_2.kt
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.generated.MyBeautifulCacheLayer | |
class FreezeCacheActivity : AppCompatActivity(), OnOperationSuccessfulCallback<String?> { | |
private lateinit var button: Button |
View freeze_example_1.kt
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.CacheKey | |
import com.arcane.coldstorageannotation.Freeze | |
import java.net.URL | |
/** | |
* Putting all the rest calls into this class and applying the annotation. | |
* It is optional to use the generatedClassName paramter. If no value is passed to it , the generated class | |
* will have the prefix Generated along with the original class name. Eg -> GeneratedMakeRemoteCallWithFreeze | |
**/ | |
@Freeze(generatedClassName = "MyBeautifulCacheLayer") |
View adapter.kt
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
class MyAdapter(private val dataset: List<String>) | |
: RecyclerView.Adapter<MyAdapter.ViewHolder>() { | |
private var currentSelection = 0 | |
/** | |
* The view holder. | |
*/ | |
class ViewHolder(val view: View) : RecyclerView.ViewHolder(view) { |
NewerOlder