minimal change to style/behavior of statistics sheet

master
y20k 2017-12-18 17:10:55 +01:00
parent c7e126d0e7
commit 5d1e00a706
2 changed files with 10 additions and 17 deletions

View File

@ -30,6 +30,7 @@ import android.support.design.widget.BottomSheetBehavior;
import android.support.v4.app.DialogFragment; import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.LocalBroadcastManager; import android.support.v4.content.LocalBroadcastManager;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -438,16 +439,12 @@ public class MainActivityTrackFragment extends Fragment implements AdapterView.O
case BottomSheetBehavior.STATE_EXPANDED: case BottomSheetBehavior.STATE_EXPANDED:
// statistics sheet expanded // statistics sheet expanded
mTrackManagementLayout.setVisibility(View.INVISIBLE); mTrackManagementLayout.setVisibility(View.INVISIBLE);
// mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_blue_85percent)); mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_white_85percent));
// mStatisticsIcon.setBackgroundResource(R.drawable.ic_statistics_white_48dp);
// mStatisticsHeadline.setVisibility(View.VISIBLE);
break; break;
case BottomSheetBehavior.STATE_COLLAPSED: case BottomSheetBehavior.STATE_COLLAPSED:
// statistics sheet collapsed // statistics sheet collapsed
mTrackManagementLayout.setVisibility(View.VISIBLE); mTrackManagementLayout.setVisibility(View.VISIBLE);
// mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_transparent)); mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_white));
// mStatisticsIcon.setBackgroundResource(R.drawable.ic_statistics_blue_48dp);
// mStatisticsHeadline.setVisibility(View.INVISIBLE);
mStatisticsSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); mStatisticsSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
break; break;
case BottomSheetBehavior.STATE_HIDDEN: case BottomSheetBehavior.STATE_HIDDEN:
@ -466,15 +463,11 @@ public class MainActivityTrackFragment extends Fragment implements AdapterView.O
} else { } else {
mTrackManagementLayout.setVisibility(View.INVISIBLE); mTrackManagementLayout.setVisibility(View.INVISIBLE);
} }
// if (slideOffset < 0.125f) { if (slideOffset < 0.125f) {
// mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_transparent)); mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_white));
// mStatisticsIcon.setBackgroundResource(R.drawable.ic_statistics_blue_48dp); } else {
// mStatisticsHeadline.setVisibility(View.INVISIBLE); mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_white_85percent));
// } else { }
// mStatisticsSheet.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.trackbook_blue_85percent));
// mStatisticsIcon.setBackgroundResource(R.drawable.ic_statistics_white_48dp);
// mStatisticsHeadline.setVisibility(View.VISIBLE);
// }
} }
}; };
} }

View File

@ -74,8 +74,8 @@
android:layout_width="@dimen/bottom_sheet_width" android:layout_width="@dimen/bottom_sheet_width"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:background="@color/trackbook_white_85percent" android:background="@color/trackbook_white"
app:behavior_hideable="true" app:behavior_hideable="false"
app:behavior_peekHeight="112dp" app:behavior_peekHeight="112dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"> app:layout_behavior="android.support.design.widget.BottomSheetBehavior">