Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
35 changes: 35 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# Github Test
# Movies App

Eae Candidato!
This app allows you to view a list of movies, series, and favorites, and view more details of each item

Este desafio consiste em identificar seu nível de conforto com desenvolvimento para Android, portanto esperamos que você tente resolve-lo usando toda a sua capacidade e conhecimento da tecnologia.
# Omdb API

O Desafio Android é o seguinte:
The queries and requests were made using the Omdb API
http://www.omdbapi.com/

Monte um aplicativo para Android, utilizando Java ou Kotlin (Escolha qualquer um não faz diferença), que consuma uma API REST e mostre uma lista de dados, ao clicar em um dos itens desta lista, uma segunda tela é mostrada contendo mais informações sobre aquele item.
# Tools, Components and Architecture used

Tente colocar ao máximo todos os recursos técnicos que você conhece, quando se trata de padrão de arquitetura, boas práticas de código, novas bibliotecas nativas do Android etc. Mas não se esqueça que nosso grande e querido usuário não vê as rotinas assíncronas majestosas que todos nós escrevemos, sendo assim, tente criar uma interface bem legal, objetiva e agradável. Colocamos também um link para um repositório no Zeplin contendo uma sugestão de interface.
BottomNavigationView
https://developer.android.com/reference/android/support/design/widget/BottomNavigationView

Você deve fazer um Fork deste repositório e solicitar um Pull Request, com seu nome completo na descrição, para nossa avaliação.
CardView
https://developer.android.com/guide/topics/ui/layout/cardview

Recomendamos algumas API’s abertas e gratuitas para estes teste, porém isto é apenas uma recomendação, se sinta livre para fazer outra escolha e nos surpreender ;).
CollapsingToolbar
https://material.io/develop/android/components/collapsing-toolbar-layout/

# API’s
## The Open Movie Database
[OMDb API - The Open Movie Database](http://www.omdbapi.com/)

## Unsplash
[Unsplash Image API | Free HD Photo API](https://unsplash.com/developers)
RecyclerView
https://developer.android.com/guide/topics/ui/layout/recyclerview

# Design - Zeplin
E-mail - buildbox.mobileguest@gmail.com
Senha - JhZ5dAPG
Retrofit
https://square.github.io/retrofit/

[Zeplin](https://app.zeplin.io/login)

![footer](https://miro.medium.com/max/480/1*jA64NTovT-efZ96tcq-X5g.png)
MVVM
https://medium.com/brq-techblog/android-mvvm-e-databinding-fd4595e271c9
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
71 changes: 71 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.movies"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
def nav_version = "1.0.0-rc02"
def lifecycle_version = "2.0.0"
def room_version = "2.1.0-alpha04"

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.core:core-ktx:1.1.0-alpha04'

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

//material components
implementation 'com.google.android.material:material:1.0.0'
//navigation
implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version" // use -ktx for Kotlin
implementation "android.arch.navigation:navigation-ui-ktx:$nav_version" // use -ktx for Kotlin
//Viewmodel and Livedata
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
//Room Database
implementation "androidx.room:room-runtime:$room_version"
implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-beta01'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
kapt "androidx.room:room-compiler:$room_version"
//Koin
implementation 'org.koin:koin-android-viewmodel:1.0.2'
//Retrofit and Gson
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'

//Glide
implementation 'com.github.bumptech.glide:glide:4.4.0'
kapt 'com.github.bumptech.glide:compiler:4.4.0'

implementation 'com.android.support:design:28.1.0'

implementation 'com.android.support:cardview-v7:28.0.+'

implementation 'androidx.vectordrawable:vectordrawable:1.1.0-alpha01'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.example.movies

import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.example.movies", appContext.packageName)
}
}
27 changes: 27 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.movies">
<uses-permission android:name="android.permission.INTERNET"/>
<application

android:screenOrientation="portrait"
android:name=".MyApplication"
android:usesCleartextTraffic="true"
android:allowBackup="true"
android:icon="@drawable/ic_local_movies_black_24dp"
android:label="@string/app_name"
android:roundIcon="@drawable/ic_local_movies_black_24dp"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".ui.activites.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>

</manifest>
14 changes: 14 additions & 0 deletions app/src/main/java/com/example/movies/MyApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.example.movies

import android.app.Application
import com.example.movies.dependencies_injection.DiModules
import org.koin.android.ext.android.startKoin

class MyApplication: Application() {

override fun onCreate() {
super.onCreate()

startKoin(this, listOf(DiModules.appModule))
}
}
21 changes: 21 additions & 0 deletions app/src/main/java/com/example/movies/api/OmdbInstance.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.example.movies.api

import com.example.movies.api.interfaces.GetMovieDataService
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class OmdbInstance {
private var retrofit: Retrofit? = null
fun getOmdbInstance(): Retrofit {
if (retrofit == null) {
retrofit = retrofit2.Retrofit.Builder()
.baseUrl("http://www.omdbapi.com/")
.addConverterFactory(GsonConverterFactory.create())
.build()
}
return retrofit!!
}

fun movieService() = getOmdbInstance().create(GetMovieDataService::class.java)

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.example.movies.api.interfaces

import com.example.movies.data.Movie
import com.example.movies.data.MovieList
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query

interface GetMovieDataService {

@GET("/")
abstract fun list(@Query("s") s: String, @Query("apikey") apikey: String, @Query("type") type: String): Call<MovieList>
@GET("/")
abstract fun detail(@Query("i") s: String, @Query("apikey") apikey: String): Call<Movie>


}
Loading