diff --git a/app/src/main/java/madelyntav/c4q/nyc/chipchop/BuyActivity.java b/app/src/main/java/madelyntav/c4q/nyc/chipchop/BuyActivity.java index d2e598f..04eecd3 100644 --- a/app/src/main/java/madelyntav/c4q/nyc/chipchop/BuyActivity.java +++ b/app/src/main/java/madelyntav/c4q/nyc/chipchop/BuyActivity.java @@ -19,6 +19,8 @@ import android.view.Menu; import android.view.MenuItem; import android.view.View; +import android.view.animation.Animation; +import android.view.animation.AnimationUtils; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.ArrayAdapter; @@ -226,14 +228,24 @@ public void onClick(View view) { new Toolbar(this), R.string.drawer_open, R.string.drawer_close) { + final ImageView myImage = (ImageView)findViewById(R.id.profile_image); public void onDrawerClosed(View view) { -// + myImage.setVisibility(View.INVISIBLE); } public void onDrawerOpened(View drawerView) { + + myImage.setVisibility(View.VISIBLE); + final Animation myRotation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotate); + myImage.startAnimation(myRotation); + sellButton = (Button) findViewById(R.id.sellButton); + Animation shake = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.shake); + drawerUserNameTV.startAnimation(shake); + + new MaterialShowcaseView.Builder(BuyActivity.this) .setTarget(sellButton) .setMaskColour(R.drawable.showcase) @@ -292,6 +304,9 @@ public void run() { private void bindViews() { drawerUserNameTV = (TextView) findViewById(R.id.drawer_user_nameTV); + + + frameLayout = (FrameLayout) findViewById(R.id.sellerFrameLayout); DrawerLinear = (LinearLayout) findViewById(R.id.DrawerLinear); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); diff --git a/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_Map.java b/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_Map.java index bf62d5d..cc63c28 100644 --- a/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_Map.java +++ b/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_Map.java @@ -7,14 +7,12 @@ import android.content.IntentSender; import android.content.SharedPreferences; import android.graphics.Color; -import android.graphics.drawable.Drawable; import android.location.Location; import android.location.LocationManager; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.provider.Settings; -import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; @@ -25,6 +23,9 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.view.animation.Animation; +import android.view.animation.AnimationUtils; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.Toast; @@ -65,7 +66,7 @@ public class Fragment_Buyer_Map extends Fragment implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener { View coordinatorLayoutView; - FloatingActionButton refreshButton; + ImageButton refreshButton; ImageView arrowImage; public SlidingUpPanelLayout slidingPanel; public final static int CONNECTION_FAILURE_RESOLUTION_REQUEST = 9000; @@ -121,6 +122,7 @@ private void setListeners() { public void onClick(View view) { // TODO: WRITE CODE TO REFRESH RECYCLERVIEW !! activity.replaceFragment(new Fragment_Buyer_Map()); + } }); @@ -215,7 +217,11 @@ private void initializeMap() { private void bindViews() { arrowImage = (ImageView) root.findViewById(R.id.arrow_image); itemsRView = (RecyclerView) root.findViewById(R.id.buyers_orders_list); - refreshButton = (FloatingActionButton) root.findViewById(R.id.refresh_button); + refreshButton = (ImageButton) root.findViewById(R.id.refresh_button); + + final Animation myRotation = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate); + refreshButton.startAnimation(myRotation); + coordinatorLayoutView = root.findViewById(R.id.snackbarPosition); slidingPanel = (SlidingUpPanelLayout) root.findViewById(R.id.slidinglayout); diff --git a/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_SellerProfile.java b/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_SellerProfile.java index 7e53747..277238b 100644 --- a/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_SellerProfile.java +++ b/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_SellerProfile.java @@ -12,6 +12,9 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.animation.Animation; +import android.view.animation.AnimationUtils; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RatingBar; @@ -38,7 +41,7 @@ public class Fragment_Buyer_SellerProfile extends Fragment { public static final String TAG = "fragment_buyer_seller_profile"; - android.support.design.widget.FloatingActionButton cartButton; + ImageButton cartButton; private ArrayList foodItems; private RecyclerView foodList; @@ -47,7 +50,7 @@ public class Fragment_Buyer_SellerProfile extends Fragment { View coordinatorLayoutView; CircleImageView storeImage; - TextView storeName,storeDescription; + TextView storeName,storeDescription, cookingStatus; TextView deliveryTV, pickupTV; RatingBar ratingBar; @@ -161,8 +164,10 @@ private void setListeners() { cartButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { + BuyActivity activity = (BuyActivity) getActivity(); activity.replaceFragment(new Fragment_Buyer_ViewCart()); + } }); } @@ -178,10 +183,23 @@ private void bindViews(View root) { containingView = (LinearLayout) root.findViewById(R.id.container); containingView.setVisibility(View.INVISIBLE); - cartButton = (android.support.design.widget.FloatingActionButton) root.findViewById(R.id.viewCartButton); + cartButton = (ImageButton) root.findViewById(R.id.viewCartButton); + final Animation myRotation2 = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate); + cartButton.startAnimation(myRotation2); + foodList = (RecyclerView) root.findViewById(R.id.seller_items_list); storeImage = (CircleImageView) root.findViewById(R.id.profile_image); + +// + + cookingStatus =(TextView) root.findViewById(R.id.cooking_status); + + Animation shake = AnimationUtils.loadAnimation(getActivity(), R.anim.shake); + cookingStatus.startAnimation(shake); + + storeName = (TextView) root.findViewById(R.id.seller_name); + storeDescription = (TextView) root.findViewById(R.id.store_description); coordinatorLayoutView = root.findViewById(R.id.snackbarPosition); ratingBar = (RatingBar) root.findViewById(R.id.rating_bar); diff --git a/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_ViewCart.java b/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_ViewCart.java index cad4482..eef9526 100644 --- a/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_ViewCart.java +++ b/app/src/main/java/madelyntav/c4q/nyc/chipchop/fragments/Fragment_Buyer_ViewCart.java @@ -12,6 +12,9 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.animation.Animation; +import android.view.animation.AnimationUtils; +import android.widget.ImageButton; import java.util.ArrayList; @@ -33,7 +36,7 @@ public class Fragment_Buyer_ViewCart extends Fragment { public static final String TAG = "fragment_buyer_view_cart"; public static final String FROM_CART = "from_cart"; - android.support.design.widget.FloatingActionButton checkoutButton; + ImageButton checkoutButton; private ArrayList cartItems; private RecyclerView cartList; private DBHelper dbHelper; @@ -98,10 +101,12 @@ private void setListAdapter() { } private void bindViews(View root) { - checkoutButton = (android.support.design.widget.FloatingActionButton) root.findViewById(R.id.checkoutButton); + checkoutButton = (ImageButton) root.findViewById(R.id.checkoutButton); + final Animation myRotation = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate); + checkoutButton.startAnimation(myRotation); + cartList = (RecyclerView) root.findViewById(R.id.cart_list); coordinatorLayoutView = root.findViewById(R.id.snackbarPosition); - } private void initializeData() { diff --git a/app/src/main/res/anim/anim_scale.xml b/app/src/main/res/anim/anim_scale.xml new file mode 100644 index 0000000..7371808 --- /dev/null +++ b/app/src/main/res/anim/anim_scale.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/cycle.xml b/app/src/main/res/anim/cycle.xml new file mode 100644 index 0000000..53e5e3f --- /dev/null +++ b/app/src/main/res/anim/cycle.xml @@ -0,0 +1,3 @@ + + diff --git a/app/src/main/res/anim/rotate b/app/src/main/res/anim/rotate new file mode 100644 index 0000000..b42feba --- /dev/null +++ b/app/src/main/res/anim/rotate @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/anim/scale_fab_in.xml b/app/src/main/res/anim/scale_fab_in.xml new file mode 100644 index 0000000..920d266 --- /dev/null +++ b/app/src/main/res/anim/scale_fab_in.xml @@ -0,0 +1,10 @@ + + diff --git a/app/src/main/res/anim/scale_fab_out.xml b/app/src/main/res/anim/scale_fab_out.xml new file mode 100644 index 0000000..3787de8 --- /dev/null +++ b/app/src/main/res/anim/scale_fab_out.xml @@ -0,0 +1,10 @@ + + \ No newline at end of file diff --git a/app/src/main/res/anim/shake.xml b/app/src/main/res/anim/shake.xml new file mode 100644 index 0000000..0937541 --- /dev/null +++ b/app/src/main/res/anim/shake.xml @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/app/src/main/res/drawable/roundedbutton.xml b/app/src/main/res/drawable/roundedbutton.xml new file mode 100644 index 0000000..cf75a05 --- /dev/null +++ b/app/src/main/res/drawable/roundedbutton.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_buy.xml b/app/src/main/res/layout/activity_buy.xml index a30f69a..0d88c11 100644 --- a/app/src/main/res/layout/activity_buy.xml +++ b/app/src/main/res/layout/activity_buy.xml @@ -58,7 +58,8 @@ android:padding="15dp" android:layout_marginTop="25dp" app:border_color="#FFF" - android:layout_gravity="center_horizontal"/> + android:layout_gravity="center_horizontal" + android:visibility="invisible"/> - + + + + + + + + + + + + android:layout_marginRight="25dp" + android:padding="15dp" + android:background = "@drawable/roundedbutton" + android:layout_above="@+id/seller_items_list" + android:elevation="6dp" + + /> - + + + + + + + + + + + + + + android:layout_marginEnd="5dp" + android:padding="15dp" + android:background = "@drawable/roundedbutton" + android:layout_above="@+id/seller_items_list" + android:elevation="6dp" + android:layout_marginTop="20dp" + android:layout_marginRight="20dp" + /> diff --git a/app/src/main/res/layout/fragment_buyer_seller_profile.xml b/app/src/main/res/layout/fragment_buyer_seller_profile.xml index b5a736d..b8692eb 100644 --- a/app/src/main/res/layout/fragment_buyer_seller_profile.xml +++ b/app/src/main/res/layout/fragment_buyer_seller_profile.xml @@ -131,16 +131,32 @@ - + + + + + + + + + + + + + + android:elevation="6dp" + /> \ No newline at end of file