This file contains hidden or 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
name: CI/CD counter app | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
#First we will see the application build or not , then we will deploy in EC2 | |
build: | |
runs-on: ubuntu-latest |
This file contains hidden or 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
object RealPathUtil { | |
fun getRealPath(context: Context, fileUri: Uri): String? { | |
// SDK >= 11 && SDK < 19 | |
return if (Build.VERSION.SDK_INT < 19) { | |
getRealPathFromURIAPI11to18(context, fileUri) | |
} else { | |
getRealPathFromURIAPI19(context, fileUri) | |
}// SDK > 19 (Android 4.4) and up |
This file contains hidden or 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
recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() { | |
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { | |
super.onScrolled(recyclerView, dx, dy) | |
if (dy < 0 && firstVisibleItemPosition == 0 && !isLoadMore) { | |
loadMoreData() | |
} | |
} | |
}) |
This file contains hidden or 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, { useEffect } from "react"; | |
import clsx from "clsx"; | |
import { makeStyles, useTheme } from "@material-ui/core/styles"; | |
import { | |
Hidden, | |
ListItem, | |
ListItemIcon, | |
ListItemText, | |
List, | |
Typography, |
This file contains hidden or 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, { useEffect, useRef, useState } from "react"; | |
const optionList = [ | |
{ id: "1", option: "Text" }, | |
{ id: "2", option: "Loooooong Text" }, | |
{ id: "3", option: "Looooooooooooooooooooooooooooooooong Text" }, | |
{ | |
id: "4", | |
option: | |
"Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong Text", |
This file contains hidden or 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
name: gae-ci-cd | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
name: deploy | |
runs-on: ubuntu-latest |
This file contains hidden or 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 GetPopularMoviesUseCase(private val movieRepository: MovieRepository) { | |
suspend operator fun invoke()=movieRepository.getPopularMovies() | |
} |
This file contains hidden or 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
interface MovieRepository { | |
suspend fun getPopularMovies(): Result<MovieList> | |
} |
This file contains hidden or 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
interface MovieApi { | |
@GET("movie/popular") | |
suspend fun getPopularMovies( | |
@Query( | |
"api_key" | |
) apiKey: String | |
): Response<MovieList> | |
} |
This file contains hidden or 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
interface MovieRemoteDataSource { | |
suspend fun getPopularMovies(): Response<MovieList> | |
} |
OlderNewer