Skip to content
Open

Qa #24

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
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "me.kevinkang.timecapsule"
minSdkVersion 21
targetSdkVersion 24
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -24,14 +24,14 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.google.firebase:firebase-auth:9.6.1'
compile 'com.google.android.gms:play-services-auth:9.6.1'
compile 'com.google.firebase:firebase-database:9.6.1'
compile 'com.google.firebase:firebase-storage:9.6.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.afollestad.material-dialogs:core:0.9.0.2'
compile 'com.google.firebase:firebase-auth:9.6.0'
compile 'com.google.android.gms:play-services-auth:9.6.0'
compile 'com.google.firebase:firebase-database:9.6.0'
compile 'com.google.firebase:firebase-storage:9.6.0'
testCompile 'junit:junit:4.12'
}

Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/me/kevinkang/timecapsule/Validator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package me.kevinkang.timecapsule;

/**
* Created by Ethan on 10/23/2016.
*/

public class Validator {
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.Menu;
import android.view.View;

import java.util.ArrayList;
import java.util.List;

import me.kevinkang.timecapsule.R;
import me.kevinkang.timecapsule.data.CurrentUser;
import me.kevinkang.timecapsule.data.firebase.TimeCapsuleUser;
import me.kevinkang.timecapsule.data.mock.MockCapsule;
import me.kevinkang.timecapsule.data.models.Capsule;
import me.kevinkang.timecapsule.data.models.User;

public class MainActivity extends AppCompatActivity {

private RecyclerView recyclerView;
private SwipeRefreshLayout swipeRefreshLayout;
private LinearLayoutManager layoutManager;
private CapsuleAdapter capsuleAdapter;
private TimeCapsuleUser capsuleUser;
private User capsuleUser;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -35,15 +38,10 @@ protected void onCreate(Bundle savedInstanceState) {
layoutManager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(layoutManager);

List<Capsule> capsuleList = new ArrayList<>();
capsuleUser = CurrentUser.getInstance();

for(int i = 0; i < 10; i++){
capsuleList.add(new MockCapsule());
}

capsuleAdapter = new CapsuleAdapter(capsuleList);
capsuleAdapter = new CapsuleAdapter(capsuleUser.getCapsules());
recyclerView.setAdapter(capsuleAdapter);
capsuleUser = new TimeCapsuleUser();

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
Expand All @@ -59,4 +57,12 @@ public void onCapsuleClick(View view){
Intent mainIntent = new Intent(this, CapsuleDetailActivity.class);
this.startActivity(mainIntent);
}


@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main_activity, menu);
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;

import com.afollestad.materialdialogs.DialogAction;
Expand All @@ -25,9 +24,6 @@
import com.google.firebase.database.FirebaseDatabase;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.URI;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap;
Expand All @@ -36,7 +32,6 @@
import java.util.UUID;

import me.kevinkang.timecapsule.R;
import me.kevinkang.timecapsule.data.firebase.FbUser;
import me.kevinkang.timecapsule.data.firebase.FirebaseAttachment;
import me.kevinkang.timecapsule.data.firebase.FirebaseCapsule;
import me.kevinkang.timecapsule.data.firebase.FirebaseCapsuleRecipient;
Expand All @@ -46,7 +41,6 @@ public class NewCapsuleActivity extends AppCompatActivity {
private static final int PICK_IMAGE = 24;
private static final int PICKFILE_REQUEST_CODE = 12;
// TODO: retrieve uid to get user
private FbUser user;
private static final String TAG = "NewCapsuleActivity";
List<Recipient> recipients;

Expand Down
15 changes: 15 additions & 0 deletions app/src/main/java/me/kevinkang/timecapsule/data/CurrentUser.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package me.kevinkang.timecapsule.data;

import me.kevinkang.timecapsule.data.firebase.TimeCapsuleUser;
import me.kevinkang.timecapsule.data.models.User;

/**
* Created by Ethan on 10/23/2016.
*/

public class CurrentUser {

public static User getInstance(){
return TimeCapsuleUser.getCurrentUser();
}
}

This file was deleted.

Loading