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.arildojr.nubank.ui.activities | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import com.arildojr.nubank.R | |
import android.content.Intent | |
class SplashActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { |
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"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<color android:color="@color/colorPrimary" /> | |
</item> | |
<item android:drawable="@drawable/ic_nu_white" android:gravity="center"/> | |
</layer-list> |
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
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> | |
<item name="android:windowBackground">@drawable/background_splash</item> | |
<item name="windowActionBar">false</item> | |
<item name="windowNoTitle">true</item> | |
<item name="android:statusBarColor">@color/colorPrimary</item> | |
</style> |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="com.arildojr.nubank"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" |
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 DashboardActivity : AppCompatActivity() { | |
private lateinit var binding: ActivityDashboardBinding | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
binding = DataBindingUtil.setContentView(this, R.layout.activity_dashboard) | |
setupAccountMenu() | |
} |
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 NoConnectionInterceptor(private val context: Context) : Interceptor { | |
override fun intercept(chain: Interceptor.Chain): Response { | |
return if (!isConnectionOn()) { | |
throw Exception("CELULAR CONECTADO") | |
} else if (!isInternetAvailable()) { | |
throw Exception("MAS SEM INTERNET") | |
} else { | |
Log.e(">>>> ", "Deu Bom") | |
chain.proceed(chain.request()) | |
} |
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
name: Android CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: set up JDK 1.8 | |
uses: actions/setup-java@v1 |
OlderNewer