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 androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
import androidx.paging.compose.LazyPagingItems | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.lazy.grid.GridCells | |
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid | |
import androidx.compose.material3.CircularProgressIndicator |
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.bizyback.play.circletest | |
/** | |
* The implementation of the prepare function is abstracted from the callers | |
*/ | |
interface Food { | |
fun prepare(time: Int): String = "Preparing ${getIngredients()} as a ${this::class.simpleName} in $time minutes" | |
fun getIngredients(): 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
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.material3.Button | |
import androidx.compose.material3.Text | |
import androidx.compose.runtime.* | |
import androidx.compose.ui.Alignment | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.text.style.TextAlign | |
import androidx.compose.ui.tooling.preview.Preview |
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 Foundation | |
var greeting = "Hello, playground" | |
func getvalue<T>(m: Double) -> T { | |
return m as! T | |
} |
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.mambobryan.samba.ui.adapters | |
import android.view.LayoutInflater | |
import android.view.ViewGroup | |
import androidx.core.view.isVisible | |
import androidx.paging.LoadState | |
import androidx.paging.LoadStateAdapter | |
import androidx.recyclerview.widget.RecyclerView | |
import com.mambobryan.samba.databinding.LayoutLoadStateBinding | |
import timber.log.Timber |
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.mambobryan.samba.ui.adapters | |
import android.view.LayoutInflater | |
import android.view.ViewGroup | |
import androidx.paging.PagingDataAdapter | |
import androidx.recyclerview.widget.RecyclerView | |
import coil.load | |
import coil.size.Scale | |
import com.facebook.shimmer.Shimmer | |
import com.facebook.shimmer.ShimmerDrawable |
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.mambobryan.samba.ui.characters | |
import android.os.Bundle | |
import android.view.View | |
import androidx.core.view.isVisible | |
import androidx.fragment.app.Fragment | |
import androidx.fragment.app.activityViewModels | |
import androidx.lifecycle.lifecycleScope | |
import androidx.paging.LoadState | |
import com.mambobryan.samba.R |
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.mambobryan.samba.ui.characters | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.viewModelScope | |
import androidx.paging.cachedIn | |
import com.mambobryan.samba.data.repositories.CharactersRepository | |
import dagger.hilt.android.lifecycle.HiltViewModel | |
import javax.inject.Inject | |
@HiltViewModel |
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.mambobryan.samba.data.repositories | |
import androidx.paging.ExperimentalPagingApi | |
import androidx.paging.Pager | |
import androidx.paging.PagingConfig | |
import androidx.paging.PagingData | |
import com.mambobryan.samba.data.local.AppDatabase | |
import com.mambobryan.samba.data.model.Character | |
import com.mambobryan.samba.data.remote.ApiService | |
import com.mambobryan.samba.data.remote.CharactersPagingSource |
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.mambobryan.samba.data.remote | |
import androidx.paging.PagingSource | |
import androidx.paging.PagingState | |
import com.mambobryan.samba.data.model.Character | |
import com.mambobryan.samba.utils.Constants | |
import kotlinx.coroutines.delay | |
import retrofit2.HttpException | |
import timber.log.Timber | |
import java.io.IOException |
NewerOlder