Commit 1ec78012 authored by jake.ejraee's avatar jake.ejraee

Update homeScreen.java

parent 3d12ed9b
......@@ -2,13 +2,20 @@ package com.example.soulfood_assignment2;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v4.view.ViewCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
public class homeScreen extends AppCompatActivity {
int swipeStartX;
......@@ -24,8 +31,12 @@ public class homeScreen extends AppCompatActivity {
settingsButton = this.findViewById(R.id.buttonSettings);
ViewCompat.setTranslationZ(sideView, 20f); //bring sideView in front of buttons
Button b = (Button)findViewById(R.id.suggestButton);
b.setOnClickListener(new Listener());
SharedPreferences saves = getApplicationContext().getSharedPreferences("Saves", 0);
if(!saves.contains("saves")){
SharedPreferences.Editor e = saves.edit();
e.putStringSet("saves", new HashSet<String>());
e.commit();
}
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment