├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_movies.xml │ │ │ │ ├── activity_toolbar.xml │ │ │ │ ├── activity_change_background.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── item_movie.xml │ │ │ │ └── activity_current_day.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── codepath │ │ │ │ └── debuggingchallenges │ │ │ │ ├── activities │ │ │ │ ├── CurrentDayActivity.java │ │ │ │ ├── ChangeBackgroundActivity.java │ │ │ │ ├── ToolbarActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── MoviesActivity.java │ │ │ │ ├── models │ │ │ │ └── Movie.java │ │ │ │ └── adapters │ │ │ │ └── MoviesAdapter.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── codepath │ │ │ └── debuggingchallenges │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── codepath │ │ └── debuggingchallenges │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .travis.yml ├── gradle.properties ├── .gitignore ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codepath/android-debugging-challenges/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codepath/android-debugging-challenges/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codepath/android-debugging-challenges/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codepath/android-debugging-challenges/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codepath/android-debugging-challenges/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codepath/android-debugging-challenges/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Apr 25 22:56:58 PDT 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | jdk: 3 | - oraclejdk8 4 | sudo: false 5 | android: 6 | components: 7 | - tools 8 | - platform-tools 9 | - build-tools-27.0.3 10 | - android-27 11 | licenses: 12 | - android-sdk-license-.+ 13 | script: 14 | - "./gradlew build check --daemon" 15 | after_failure: "cat $TRAVIS_BUILD_DIR/app/build/outputs/lint-results-debug.xml" 16 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/com/codepath/debuggingchallenges/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.codepath.debuggingchallenges; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/codepath/debuggingchallenges/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.codepath.debuggingchallenges; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/nickai/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DebuggingChallenges 3 | What day is it? 4 | Poster Image 5 | View Movies 6 | Rating: %1$.2f 7 | Go 8 | Background Changer 9 | Toolbar 10 | Hello! 11 | Submit 12 | Search 13 | This is a Sample of Really Large Text 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | 6 | defaultConfig { 7 | applicationId "com.codepath.debuggingchallenges" 8 | minSdkVersion 21 9 | targetSdkVersion 28 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | testImplementation 'junit:junit:4.12' 23 | implementation 'androidx.appcompat:appcompat:1.0.0' 24 | implementation 'androidx.recyclerview:recyclerview:1.0.0' 25 | implementation 'com.codepath.libraries:asynchttpclient:0.0.9' 26 | implementation 'com.github.bumptech.glide:glide:4.8.0' 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/codepath/debuggingchallenges/activities/CurrentDayActivity.java: -------------------------------------------------------------------------------- 1 | package com.codepath.debuggingchallenges.activities; 2 | 3 | import android.os.Bundle; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import android.widget.TextView; 6 | 7 | import com.codepath.debuggingchallenges.R; 8 | 9 | import java.util.Calendar; 10 | 11 | public class CurrentDayActivity extends AppCompatActivity { 12 | 13 | TextView tvDay; 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.activity_current_day); 19 | tvDay = (TextView) findViewById(R.id.tvDay); 20 | tvDay.setText(getDayOfMonth()); 21 | } 22 | 23 | private int getDayOfMonth() { 24 | Calendar cal = Calendar.getInstance(); 25 | return cal.get(Calendar.DAY_OF_MONTH); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_movies.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | android.enableJetifier=true 20 | android.useAndroidX=true -------------------------------------------------------------------------------- /app/src/main/java/com/codepath/debuggingchallenges/activities/ChangeBackgroundActivity.java: -------------------------------------------------------------------------------- 1 | package com.codepath.debuggingchallenges.activities; 2 | 3 | import android.graphics.Color; 4 | import android.os.Bundle; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import android.view.View; 7 | 8 | import com.codepath.debuggingchallenges.R; 9 | 10 | public class ChangeBackgroundActivity extends AppCompatActivity { 11 | 12 | private int oldColor = Color.BLUE; 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_change_background); 18 | } 19 | 20 | public void onGoClick(View view) { 21 | View mainView = findViewById(android.R.id.content); 22 | mainView.setBackgroundColor(getNextColor()); 23 | } 24 | 25 | private int getNextColor() { 26 | int newColor = (oldColor == Color.BLUE) ? Color.RED : Color.BLUE; 27 | oldColor = newColor; 28 | return newColor; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/codepath/debuggingchallenges/activities/ToolbarActivity.java: -------------------------------------------------------------------------------- 1 | package com.codepath.debuggingchallenges.activities; 2 | 3 | import android.os.Bundle; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import android.widget.TextView; 6 | import android.widget.Toolbar; 7 | 8 | import com.codepath.debuggingchallenges.R; 9 | 10 | public class ToolbarActivity extends AppCompatActivity { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.activity_toolbar); 16 | 17 | // Find the toolbar view inside the activity layout 18 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 19 | 20 | // Sets the Toolbar to act as the ActionBar for this Activity window. 21 | // Make sure the toolbar exists in the activity and is not null 22 | setActionBar(toolbar); 23 | 24 | TextView tvDescription = (TextView) findViewById(R.id.tvDescription); 25 | tvDescription.setText(R.string.hello); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Source: https://gist.github.com/nesquena/5617544/raw/53710b374e7df3302df43b552488d876040ada3d/.gitignore 2 | 3 | # built application files 4 | *.apk 5 | *.ap_ 6 | 7 | # files for the dex VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # generated files 14 | bin/ 15 | gen/ 16 | 17 | # Local configuration file (sdk path, etc) 18 | local.properties 19 | 20 | # Eclipse project files 21 | .classpath 22 | .project 23 | 24 | # Proguard folder generated by Eclipse 25 | proguard/ 26 | 27 | # Intellij project files 28 | *.iml 29 | *.ipr 30 | *.iws 31 | .idea/ 32 | 33 | *.pydevproject 34 | .project 35 | .metadata 36 | bin/** 37 | tmp/** 38 | tmp/**/* 39 | *.tmp 40 | *.bak 41 | *.swp 42 | *~.nib 43 | local.properties 44 | .classpath 45 | .settings/ 46 | .loadpath 47 | 48 | # External tool builders 49 | .externalToolBuilders/ 50 | 51 | # Locally stored "Eclipse launch configurations" 52 | *.launch 53 | 54 | # CDT-specific 55 | .cproject 56 | 57 | # PDT-specific 58 | .buildpath 59 | 60 | # Android Studio project files 61 | *.iml 62 | .gradle 63 | .idea 64 | build 65 | import-summary.txt 66 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/codepath/debuggingchallenges/activities/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.codepath.debuggingchallenges.activities; 2 | 3 | import android.content.Intent; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | 8 | import com.codepath.debuggingchallenges.R; 9 | 10 | public class MainActivity extends AppCompatActivity { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.activity_main); 16 | } 17 | 18 | private void launchActivity(Class klass) { 19 | Intent intent = new Intent(this, klass); 20 | startActivity(intent); 21 | } 22 | 23 | public void launchCurrentDayActivity(View view) { 24 | launchActivity(CurrentDayActivity.class); 25 | } 26 | 27 | public void launchMoviesActivity(View view) { 28 | launchActivity(MoviesActivity.class); 29 | } 30 | 31 | public void launchChangeBackgroundActivity(View view) { 32 | launchActivity(ChangeBackgroundActivity.class); 33 | } 34 | 35 | public void launchToolbarActivity(View view) { 36 | launchActivity(ToolbarActivity.class); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_change_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 |