diff --git a/app/src/main/ic_bio-web.png b/app/src/main/ic_bio-web.png new file mode 100644 index 0000000..a78234c Binary files /dev/null and b/app/src/main/ic_bio-web.png differ diff --git a/app/src/main/ic_msc-web.png b/app/src/main/ic_msc-web.png new file mode 100644 index 0000000..e43aebc Binary files /dev/null and b/app/src/main/ic_msc-web.png differ diff --git a/app/src/main/ic_vegan-web.png b/app/src/main/ic_vegan-web.png new file mode 100644 index 0000000..4caa0dd Binary files /dev/null and b/app/src/main/ic_vegan-web.png differ diff --git a/app/src/main/ic_vegetarian-web.png b/app/src/main/ic_vegetarian-web.png new file mode 100644 index 0000000..a9c6982 Binary files /dev/null and b/app/src/main/ic_vegetarian-web.png differ diff --git a/app/src/main/java/de/sebse/fuplanner/fragments/canteen/MealAdapter.java b/app/src/main/java/de/sebse/fuplanner/fragments/canteen/MealAdapter.java index a308ddd..587a26e 100644 --- a/app/src/main/java/de/sebse/fuplanner/fragments/canteen/MealAdapter.java +++ b/app/src/main/java/de/sebse/fuplanner/fragments/canteen/MealAdapter.java @@ -7,6 +7,8 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import java.util.List; + import de.sebse.fuplanner.R; import de.sebse.fuplanner.services.Canteen.types.Day; import de.sebse.fuplanner.services.Canteen.types.Meal; @@ -33,6 +35,7 @@ class MealAdapter extends RecyclerView.Adapter { @Override public void onBindViewHolder(@NonNull MealViewHolder viewHolder, int i) { + viewHolder.reset(); Meal meal = getItem(i); viewHolder.mTitle.setText(meal.getName()); String value; @@ -50,6 +53,20 @@ class MealAdapter extends RecyclerView.Adapter { value = mContext.getString(R.string.prices, meal.getPriceStdnt(), meal.getPriceEmply(), meal.getPriceOther()); } viewHolder.mSubTitle.setText(value); + StringBuilder string = new StringBuilder(); + List notes = meal.getNotes(); + for (int i1 = 0, notesSize = notes.size(); i1 < notesSize; i1++) { + if (i1 != 0) + string.append("\n"); + String s = notes.get(i1); + string.append(" - ").append(s); + } + viewHolder.mNotes.setText(string.toString()); + viewHolder.mCategory.setText(meal.getCategory()); + viewHolder.mIconVegan.setVisibility(meal.getVegan() == Meal.VEGAN_VEGAN ? View.VISIBLE : View.GONE); + viewHolder.mIconVegetarian.setVisibility(meal.getVegan() == Meal.VEGAN_VEGETERIAN ? View.VISIBLE : View.GONE); + viewHolder.mIconBio.setVisibility((meal.getCertificates() & Meal.CERT_BIO) != 0 ? View.VISIBLE : View.GONE); + viewHolder.mIconMsc.setVisibility((meal.getCertificates() & Meal.CERT_MSC) != 0 ? View.VISIBLE : View.GONE); } public Meal getItem(int groupPosition) { @@ -67,107 +84,6 @@ class MealAdapter extends RecyclerView.Adapter { return 0; } - /*@Override - public String getChild(int groupPosition, int childPosititon) { - StringBuilder sb = new StringBuilder(); - sb.append("\n\n"); - for (String s : this.getGroup(groupPosition).getNotes()) - { - sb.append(s); - sb.append("\n\n"); - } - return sb.toString(); - } - - @Override - public long getChildId(int groupPosition, int childPosition) { - return childPosition; - } - - @Override - public View getChildView(int groupPosition, final int childPosition, - boolean isLastChild, View convertView, ViewGroup parent) { - - final String childText = getChild(groupPosition, childPosition); - - if (convertView == null) { - convertView = LayoutInflater.from(parent.getContext()) - .inflate(R.layout.list_all_string, parent, false); - } - - StringViewHolder itemHolder = new StringViewHolder(convertView); - itemHolder.mString.setText(childText); - - return convertView; - } - - @Override - public int getChildrenCount(int groupPosition) { - return 1; - } - - @Override - public Meal getGroup(int groupPosition) { - if (this.mDay != null) - return this.mDay.get(groupPosition); - else - return null; - } - - @Override - public int getGroupCount() { - if (this.mDay != null) - return this.mDay.size(); - else - return 0; - } - - @Override - public long getGroupId(int groupPosition) { - return groupPosition; - } - - @Override - public View getGroupView(int groupPosition, boolean isExpanded, - View convertView, ViewGroup parent) { - Meal meal = getGroup(groupPosition); - if (convertView == null) { - convertView = LayoutInflater.from(parent.getContext()) - .inflate(R.layout.list_canteen_items, parent, false); - } - - ItemViewHolder itemHolder = new ItemViewHolder(convertView); - //itemHolder.mTitle.setText(meal.getName()); - //itemHolder.mSubLeft.setText(meal.getCategory()); - String value; - switch (Preferences.getString(mContext, R.array.pref_price_group)) { - case "student": - value = mContext.getString(R.string.price, meal.getPriceStdnt()); - break; - case "employee": - value = mContext.getString(R.string.price, meal.getPriceEmply()); - break; - case "other": - value = mContext.getString(R.string.price, meal.getPriceOther()); - break; - default: - value = mContext.getString(R.string.prices, meal.getPriceStdnt(), meal.getPriceEmply(), meal.getPriceOther()); - } - //itemHolder.mSubRight.setText(value); - - return convertView; - } - - @Override - public boolean hasStableIds() { - return false; - } - - @Override - public boolean isChildSelectable(int groupPosition, int childPosition) { - return false; - }*/ - public void setDay(Day day) { this.mDay = day; this.setDay(); diff --git a/app/src/main/java/de/sebse/fuplanner/tools/logging/Logger.java b/app/src/main/java/de/sebse/fuplanner/tools/logging/Logger.java index f7dde68..05ddbbf 100644 --- a/app/src/main/java/de/sebse/fuplanner/tools/logging/Logger.java +++ b/app/src/main/java/de/sebse/fuplanner/tools/logging/Logger.java @@ -10,10 +10,14 @@ public class Logger { } public Logger(Object object) { + this.tag = getClassName(object); + } + + public static String getClassName(Object object) { if (object instanceof String) - this.tag = (String) object; + return (String) object; else - this.tag = object.getClass().getSimpleName(); + return object.getClass().getSimpleName(); } public void d(Object... msg) { diff --git a/app/src/main/java/de/sebse/fuplanner/tools/ui/ExpandableCardViewHolder.java b/app/src/main/java/de/sebse/fuplanner/tools/ui/ExpandableCardViewHolder.java new file mode 100644 index 0000000..9b2d000 --- /dev/null +++ b/app/src/main/java/de/sebse/fuplanner/tools/ui/ExpandableCardViewHolder.java @@ -0,0 +1,27 @@ +package de.sebse.fuplanner.tools.ui; + +import android.view.View; + +import de.sebse.fuplanner.tools.ui.cardview.ExpandableCardView; + +public class ExpandableCardViewHolder extends CustomViewHolder { + ExpandableCardViewHolder(View view) { + super(view); + } + + public void reset() { + getView().reset(); + } + + ExpandableCardView getView() { + return (ExpandableCardView) mView; + } + + View getOuterView() { + return getView().getOuterView(); + } + + View getInnerView() { + return getView().getInnerView(); + } +} diff --git a/app/src/main/java/de/sebse/fuplanner/tools/ui/MealViewHolder.java b/app/src/main/java/de/sebse/fuplanner/tools/ui/MealViewHolder.java index bd53357..82057e9 100644 --- a/app/src/main/java/de/sebse/fuplanner/tools/ui/MealViewHolder.java +++ b/app/src/main/java/de/sebse/fuplanner/tools/ui/MealViewHolder.java @@ -1,19 +1,40 @@ package de.sebse.fuplanner.tools.ui; +import android.media.Image; import android.view.View; +import android.widget.ImageView; import android.widget.TextView; -import de.sebse.fuplanner.R; +import org.w3c.dom.Text; -public class MealViewHolder extends CustomViewHolder { +import de.sebse.fuplanner.R; +import de.sebse.fuplanner.tools.logging.Logger; +import de.sebse.fuplanner.tools.ui.cardview.ExpandableCardView; + +public class MealViewHolder extends ExpandableCardViewHolder { public final TextView mTitle; public final TextView mSubTitle; + public final TextView mCategory; + public final TextView mNotes; + + public final ImageView mIconVegan; + public final ImageView mIconVegetarian; + public final ImageView mIconBio; + public final ImageView mIconMsc; public MealViewHolder(View view) { super(view); - mTitle = view.findViewById(R.id.title); - mSubTitle = view.findViewById(R.id.sub_title); + View outerView = getOuterView(); + View innerView = getInnerView(); + mTitle = outerView.findViewById(R.id.title); + mSubTitle = outerView.findViewById(R.id.sub_title); + mNotes = innerView.findViewById(R.id.notes); + mCategory = innerView.findViewById(R.id.category); + mIconVegan = innerView.findViewById(R.id.icon_vegan); + mIconVegetarian = innerView.findViewById(R.id.icon_vegetarian); + mIconBio = innerView.findViewById(R.id.icon_bio); + mIconMsc = innerView.findViewById(R.id.icon_msc); } @Override diff --git a/app/src/main/java/de/sebse/fuplanner/tools/ui/cardview/ExpandableCardView.java b/app/src/main/java/de/sebse/fuplanner/tools/ui/cardview/ExpandableCardView.java index 57eb7ab..7d26485 100644 --- a/app/src/main/java/de/sebse/fuplanner/tools/ui/cardview/ExpandableCardView.java +++ b/app/src/main/java/de/sebse/fuplanner/tools/ui/cardview/ExpandableCardView.java @@ -3,27 +3,22 @@ package de.sebse.fuplanner.tools.ui.cardview; import android.content.Context; import android.content.res.TypedArray; -import android.graphics.drawable.Drawable; import android.os.Build; +import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.support.v7.widget.CardView; -import android.text.TextUtils; import android.util.AttributeSet; -import android.view.LayoutInflater; +import android.util.TypedValue; import android.view.View; -import android.view.ViewGroup; -import android.view.ViewStub; import android.view.animation.Animation; import android.view.animation.RotateAnimation; import android.view.animation.Transformation; import android.widget.ImageButton; -import android.widget.LinearLayout; -import android.widget.RelativeLayout; import android.widget.TextView; import de.sebse.fuplanner.R; import de.sebse.fuplanner.tools.UtilsUi; +import de.sebse.fuplanner.tools.logging.Logger; /** * @@ -46,21 +41,13 @@ import de.sebse.fuplanner.tools.UtilsUi; * @author Alessandro Sperotti */ -public class ExpandableCardView extends LinearLayout { - - private String title; - - private ViewGroup containerView; - - private ImageButton arrowBtn; - //private ImageButton headerIcon; - //private TextView textViewTitle; - +public class ExpandableCardView extends CardView { private int innerViewRes; private int outerViewRes; - //private Drawable iconDrawable; - private CardView card; + private View innerView; + private View outerView; + private ImageButton imageButton; public static final int DEFAULT_ANIM_DURATION = 350; private long animDuration = DEFAULT_ANIM_DURATION; @@ -71,10 +58,10 @@ public class ExpandableCardView extends LinearLayout { private boolean isExpanded = false; private boolean isExpanding = false; private boolean isCollapsing = false; - private boolean expandOnClick = false; private boolean startExpanded = false; - private int previousHeight = 0; + private int collapsedHeight = 0; + private int expandedHeight = 0; private OnExpandedListener listener; @@ -82,9 +69,11 @@ public class ExpandableCardView extends LinearLayout { if(isExpanded()) collapse(); else expand(); }; + private Logger log = new Logger(this); public ExpandableCardView(Context context) { super(context); + initView(context); } public ExpandableCardView(Context context, AttributeSet attrs) { @@ -103,19 +92,27 @@ public class ExpandableCardView extends LinearLayout { private void initView(Context context){ //Inflating View - LayoutInflater inflater = (LayoutInflater) context - .getSystemService(Context.LAYOUT_INFLATER_SERVICE); - if (inflater == null) throw new AssertionError(); - inflater.inflate(R.layout.expandable_cardview, this); + imageButton = new ImageButton(context); + imageButton.setImageDrawable(getResources().getDrawable(R.drawable.arrow_down)); + imageButton.setPadding( + (int) UtilsUi.convertDpToPixels(getContext(), 10), + (int) UtilsUi.convertDpToPixels(getContext(), 10), + (int) UtilsUi.convertDpToPixels(getContext(), 10), + (int) UtilsUi.convertDpToPixels(getContext(), 10) + ); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + TypedValue outValue = new TypedValue(); + context.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true); + imageButton.setBackgroundResource(outValue.resourceId); + } + isExpanded = startExpanded; } private void initAttributes(Context context, AttributeSet attrs){ TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.ExpandableCardView); - title = typedArray.getString(R.styleable.ExpandableCardView_title); - //iconDrawable = typedArray.getDrawable(R.styleable.ExpandableCardView_icon); + innerViewRes = typedArray.getResourceId(R.styleable.ExpandableCardView_inner_view, View.NO_ID); outerViewRes = typedArray.getResourceId(R.styleable.ExpandableCardView_outer_view, View.NO_ID); - expandOnClick = typedArray.getBoolean(R.styleable.ExpandableCardView_expandOnClick, false); animDuration = typedArray.getInteger(R.styleable.ExpandableCardView_animationDuration, DEFAULT_ANIM_DURATION); startExpanded = typedArray.getBoolean(R.styleable.ExpandableCardView_startExpanded, false); typedArray.recycle(); @@ -125,69 +122,91 @@ public class ExpandableCardView extends LinearLayout { protected void onFinishInflate() { super.onFinishInflate(); - arrowBtn = findViewById(R.id.arrow); - //textViewTitle = findViewById(R.id.title); - //headerIcon = findViewById(R.id.icon); - - //Setting attributes - /*if(!TextUtils.isEmpty(title)) textViewTitle.setText(title); - - if(iconDrawable != null){ - headerIcon.setVisibility(VISIBLE); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - headerIcon.setBackground(iconDrawable); - } - }*/ - - card = findViewById(R.id.card); - - setInnerView(innerViewRes); - setOuterView(outerViewRes); - - containerView = findViewById(R.id.viewContainer); + innerView = inflateChild(innerViewRes); + outerView = inflateChild(outerViewRes); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { setElevation(UtilsUi.convertDpToPixels(getContext(), 4)); } - if(startExpanded){ - setAnimDuration(0); - expand(); - setAnimDuration(animDuration); + setOnClickListener(defaultClickListener); + } + + @Override + protected void onLayout(boolean changed, int l, int t, int r, int b) { + removeAllViews(); + int x = getPaddingLeft(); + int y = getPaddingTop(); + addView(outerView); + outerView.layout(x, y, x+outerView.getMeasuredWidth(), y+outerView.getMeasuredHeight()); + addView(imageButton); + imageButton.layout( + getMeasuredWidth() - getPaddingRight() - imageButton.getMeasuredWidth(), + y, + getMeasuredWidth() - getPaddingRight(), + y+imageButton.getMeasuredHeight() + ); + addView(innerView); + innerView.layout(x, y+outerView.getMeasuredHeight(), x+innerView.getMeasuredWidth(), y+outerView.getMeasuredHeight()+innerView.getMeasuredHeight()); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + //log.d("w", MeasureSpec.toString(widthMeasureSpec)); + //log.d("h", MeasureSpec.toString(heightMeasureSpec)); + if (MeasureSpec.getSize(widthMeasureSpec) == 0 && MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.UNSPECIFIED || MeasureSpec.getSize(heightMeasureSpec) == 0 && MeasureSpec.getMode(heightMeasureSpec) != MeasureSpec.UNSPECIFIED) { + log.w("This should not happen! Invalid dimension size"); + setMeasuredDimension(reconcileSize(10, widthMeasureSpec), reconcileSize(10, heightMeasureSpec)); + return; } - if(expandOnClick){ - card.setOnClickListener(defaultClickListener); - arrowBtn.setOnClickListener(defaultClickListener); + int desiredWidth; + int desiredHeight; + + int widthMeasure = atMostSpec(MeasureSpec.getSize(widthMeasureSpec), widthMeasureSpec); + int heightMeasure = atMostSpec(MeasureSpec.getSize(heightMeasureSpec), heightMeasureSpec); + imageButton.measure(widthMeasure, heightMeasure); + + widthMeasure = atMostExactlySpec(Math.max(0, MeasureSpec.getSize(widthMeasureSpec)-imageButton.getMeasuredWidth()), widthMeasureSpec); + heightMeasure = atMostSpec(MeasureSpec.getSize(heightMeasureSpec), heightMeasureSpec); + outerView.measure(widthMeasure, heightMeasure); + desiredWidth = imageButton.getMeasuredWidth() + outerView.getMeasuredWidth(); + desiredHeight = Math.max(imageButton.getMeasuredHeight(), outerView.getMeasuredHeight()); + + widthMeasure = atMostSpec(MeasureSpec.getSize(widthMeasureSpec), widthMeasureSpec); + heightMeasure = atMostSpec(Math.max(0, MeasureSpec.getSize(heightMeasureSpec)-desiredHeight), heightMeasureSpec); + innerView.measure(widthMeasure, heightMeasure); + desiredWidth = Math.max(desiredWidth, innerView.getMeasuredWidth()); + desiredHeight += innerView.getMeasuredHeight(); + + desiredWidth += getPaddingLeft() + getPaddingRight(); + desiredHeight += getPaddingTop() + getPaddingBottom(); + + if (MeasureSpec.getMode(heightMeasureSpec) != MeasureSpec.EXACTLY) { + expandedHeight = desiredHeight; + collapsedHeight = desiredHeight - innerView.getMeasuredHeight(); } + setMeasuredDimension(reconcileSize(desiredWidth, widthMeasureSpec), reconcileSize(isExpanded ? expandedHeight : collapsedHeight, heightMeasureSpec)); } public void expand() { - - final int initialHeight = card.getHeight(); - - if(!isMoving()) { - previousHeight = initialHeight; - } - - card.measure(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); - int targetHeight = card.getMeasuredHeight(); + final int initialHeight = this.getHeight(); + int targetHeight = expandedHeight; + //innerView.measure(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); + //log.d(targetHeight, outerView.getHeight(), innerView.getHeight(), innerView.getMeasuredHeight()); if(targetHeight - initialHeight != 0) { - animateViews(initialHeight, - targetHeight - initialHeight, - EXPANDING); + animateViews(initialHeight, targetHeight - initialHeight, EXPANDING); } } public void collapse() { - int initialHeight = card.getMeasuredHeight(); + final int initialHeight = this.getHeight(); + int targetHeight = collapsedHeight; - if(initialHeight - previousHeight != 0) { - animateViews(initialHeight, - initialHeight - previousHeight, - COLLAPSING); + if(initialHeight - targetHeight != 0) { + animateViews(initialHeight, initialHeight - targetHeight, COLLAPSING); } } @@ -201,27 +220,23 @@ public class ExpandableCardView extends LinearLayout { Animation expandAnimation = new Animation() { @Override protected void applyTransformation(float interpolatedTime, Transformation t) { - if (interpolatedTime == 1){ + if (interpolatedTime == 1) { //Setting isExpanding/isCollapsing to false isExpanding = false; isCollapsing = false; - if(listener != null){ - if(animationType == EXPANDING){ - listener.onExpandChanged(card,true); - } - else{ - listener.onExpandChanged(card,false); - } + if (listener != null) { + if (animationType == EXPANDING) + listener.onExpandChanged(ExpandableCardView.this, true); + else + listener.onExpandChanged(ExpandableCardView.this, false); } } - card.getLayoutParams().height = animationType == EXPANDING ? (int) (initialHeight + (distance * interpolatedTime)) : - (int) (initialHeight - (distance * interpolatedTime)); - card.findViewById(R.id.viewContainer).requestLayout(); - - containerView.getLayoutParams().height = animationType == EXPANDING ? (int) (initialHeight + (distance * interpolatedTime)) : - (int) (initialHeight - (distance * interpolatedTime)); + ExpandableCardView.this.getLayoutParams().height = animationType == EXPANDING + ? (int) (initialHeight + (distance * interpolatedTime)) + : (int) (initialHeight - (distance * interpolatedTime)); + ExpandableCardView.this.requestLayout(); } @@ -247,8 +262,7 @@ public class ExpandableCardView extends LinearLayout { isCollapsing = animationType == COLLAPSING; startAnimation(expandAnimation); - //Log.d("SO","Started animation: "+ (animationType == EXPANDING ? "Expanding" : "Collapsing")); - arrowBtn.startAnimation(arrowAnimation); + imageButton.startAnimation(arrowAnimation); isExpanded = animationType == EXPANDING; } @@ -273,48 +287,21 @@ public class ExpandableCardView extends LinearLayout { this.listener = null; } - /*public void setTitle(String title){ - if(textViewTitle != null) textViewTitle.setText(title); + private View inflateChild(@LayoutRes int resId) { + return inflate(getContext(), resId, null); } - public void setTitle(int resId){ - if(textViewTitle != null) textViewTitle.setText(resId); + public View getOuterView() { + return outerView; } - public void setIcon(Drawable drawable){ - if(headerIcon != null){ - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - headerIcon.setBackground(drawable); - } - iconDrawable = drawable; - } + public View getInnerView() { + return innerView; } - public void setIcon(int resId){ - if(headerIcon != null){ - iconDrawable = ContextCompat.getDrawable(getContext(), resId); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - headerIcon.setBackground(iconDrawable); - } - } - }*/ - - private void setInnerView(int resId){ - ViewStub stub = findViewById(R.id.viewStub); - stub.setLayoutResource(resId); - stub.inflate(); - } - - private void setOuterView(int resId){ - ViewStub stub = findViewById(R.id.headerStub); - stub.setLayoutResource(resId); - View view = stub.inflate(); - } - - @Override public void setOnClickListener(@Nullable OnClickListener l) { - if(arrowBtn != null) arrowBtn.setOnClickListener(l); + if(imageButton != null) imageButton.setOnClickListener(l); super.setOnClickListener(l); } @@ -326,6 +313,50 @@ public class ExpandableCardView extends LinearLayout { this.animDuration = animDuration; } + private int reconcileSize(int contentSize, int measureSpec) { + final int mode = MeasureSpec.getMode(measureSpec); + final int specSize = MeasureSpec.getSize(measureSpec); + switch(mode) { + case MeasureSpec.EXACTLY: + return specSize; + case MeasureSpec.AT_MOST: + if (contentSize < specSize) { + return contentSize; + } else { + log.w("Your content may be cropped!"); + return specSize; + } + case MeasureSpec.UNSPECIFIED: + default: + return contentSize; + } + } + + private int atMostSpec(int atMostSpace, int measureSpec) { + if (MeasureSpec.getMode(measureSpec) == MeasureSpec.UNSPECIFIED) + return measureSpec; + else + return MeasureSpec.makeMeasureSpec(atMostSpace, MeasureSpec.AT_MOST); + } + + private int atMostExactlySpec(int atMostExactlySpace, int measureSpec) { + if (MeasureSpec.getMode(measureSpec) == MeasureSpec.UNSPECIFIED) + return measureSpec; + else + return MeasureSpec.makeMeasureSpec(atMostExactlySpace, MeasureSpec.getMode(measureSpec)); + } + + public void reset() { + long anim = getAnimDuration(); + this.setAnimDuration(0); + if (startExpanded) { + this.expand(); + } else { + this.collapse(); + } + this.setAnimDuration(anim); + } + /** * Interfaces diff --git a/app/src/main/res/layout/expandable_cardview.xml b/app/src/main/res/layout/expandable_cardview.xml deleted file mode 100644 index 14d1cd9..0000000 --- a/app/src/main/res/layout/expandable_cardview.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/list_canteen_body.xml b/app/src/main/res/layout/list_canteen_body.xml new file mode 100644 index 0000000..12f1774 --- /dev/null +++ b/app/src/main/res/layout/list_canteen_body.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/list_canteen_header.xml b/app/src/main/res/layout/list_canteen_header.xml index 83a728c..6fc6e01 100644 --- a/app/src/main/res/layout/list_canteen_header.xml +++ b/app/src/main/res/layout/list_canteen_header.xml @@ -2,7 +2,8 @@ + android:layout_height="wrap_content" + android:padding="5dp"> + app:startExpanded="true" />