Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Koustubh modified several java files to remove some errors in the code. #316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:4.1.2'
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public User(int userId) {
private String email;
private String description;
private int followers;
private int phone;

public int getUserId() {
return userId;
Expand Down Expand Up @@ -75,4 +76,9 @@ public int getFollowers() {
public void setFollowers(int followers) {
this.followers = followers;
}

public void getphone() { return phone; }

public void setPhone(int phone) { this.phone = phone; }

}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Dec 21 17:11:04 ART 2016
#Thu Sep 09 16:24:01 IST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,32 @@
package com.fernandocejas.android10.sample.presentation;

import android.app.Application;
import android.os.Build;
import android.support.annotation.RequiresApi;

import com.fernandocejas.android10.sample.presentation.internal.di.components.ApplicationComponent;
import com.fernandocejas.android10.sample.presentation.internal.di.components.DaggerApplicationComponent;
import com.fernandocejas.android10.sample.presentation.internal.di.modules.ApplicationModule;
import com.squareup.leakcanary.LeakCanary;

import java.util.stream.DoubleStream;

/**
* Android Main Application
*/
public class AndroidApplication extends Application {

private ApplicationComponent applicationComponent;
private DoubleStream DaggerApplicationComponent;

@RequiresApi(api = Build.VERSION_CODES.N)
@Override public void onCreate() {
super.onCreate();
this.initializeInjector();
this.initializeLeakDetection();
}

@RequiresApi(api = Build.VERSION_CODES.N)
private void initializeInjector() {
this.applicationComponent = DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,26 @@

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.view.Window;
import com.fernandocejas.android10.sample.presentation.R;
import com.fernandocejas.android10.sample.presentation.internal.di.HasComponent;
import com.fernandocejas.android10.sample.presentation.internal.di.components.DaggerUserComponent;
import com.fernandocejas.android10.sample.presentation.internal.di.components.UserComponent;
import com.fernandocejas.android10.sample.presentation.view.fragment.UserDetailsFragment;

import java.util.stream.DoubleStream;

/**
* Activity that shows details of a certain user.
*/
public class UserDetailsActivity extends BaseActivity implements HasComponent<UserComponent> {

private static final String INTENT_EXTRA_PARAM_USER_ID = "org.android10.INTENT_PARAM_USER_ID";
private static final String INSTANCE_STATE_PARAM_USER_ID = "org.android10.STATE_PARAM_USER_ID";
private DoubleStream DaggerUserComponent;

public static Intent getCallingIntent(Context context, int userId) {
Intent callingIntent = new Intent(context, UserDetailsActivity.class);
Expand Down Expand Up @@ -60,9 +65,10 @@ private void initializeActivity(Bundle savedInstanceState) {
}
}

@RequiresApi(api = Build.VERSION_CODES.N)
private void initializeInjector() {
this.userComponent = DaggerUserComponent.builder()
.applicationComponent(getApplicationComponent())
.toString(getApplicationComponent())
.activityModule(getActivityModule())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.view.Window;
import com.fernandocejas.android10.sample.presentation.R;
import com.fernandocejas.android10.sample.presentation.internal.di.HasComponent;
Expand All @@ -16,18 +18,23 @@
import com.fernandocejas.android10.sample.presentation.model.UserModel;
import com.fernandocejas.android10.sample.presentation.view.fragment.UserListFragment;

import java.util.stream.DoubleStream;

/**
* Activity that shows a list of Users.
*/
public class UserListActivity extends BaseActivity implements HasComponent<UserComponent>,
UserListFragment.UserListListener {

private DoubleStream DaggerUserComponent;

public static Intent getCallingIntent(Context context) {
return new Intent(context, UserListActivity.class);
}

private UserComponent userComponent;

@RequiresApi(api = Build.VERSION_CODES.N)
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
Expand All @@ -39,6 +46,7 @@ public static Intent getCallingIntent(Context context) {
}
}

@RequiresApi(api = Build.VERSION_CODES.N)
private void initializeInjector() {
this.userComponent = DaggerUserComponent.builder()
.applicationComponent(getApplicationComponent())
Expand Down