Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e685e5c authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Add header to TimersList for expired timers

Bug: 7564639

Transparent header in TimersList is now always added.

Change-Id: Ia18afd737aca83ea18320eb2c474335c728c7135
parent 239452b0
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -419,22 +419,25 @@ public class TimerFragment extends DeskClockFragment
        mTimersList = (ListView)v.findViewById(R.id.timers_list);

        // Use light's out if this fragment is within the DeskClock
        if (getActivity() instanceof DeskClock) {
        LayoutParams params;
        float dividerHeight = getResources().getDimension(R.dimen.timer_divider_height);
        if (getActivity() instanceof DeskClock) {
            View footerView = inflater.inflate(R.layout.blank_footer_view, mTimersList, false);
            LayoutParams params = footerView.getLayoutParams();
            params = footerView.getLayoutParams();
            params.height -= dividerHeight;
            footerView.setLayoutParams(params);
            footerView.setBackgroundResource(R.color.blackish);
            mTimersList.addFooterView(footerView);
        } else {
            mTimersList.setBackgroundColor(getResources().getColor(R.color.blackish));
        }
        // Make the top transparent header always visible so that the transition
        // from the DeskClock app to the alert screen will be more pleasing visually.
        View headerView = inflater.inflate(R.layout.blank_header_view, mTimersList, false);
        params = headerView.getLayoutParams();
        params.height -= dividerHeight;
        headerView.setLayoutParams(params);
        mTimersList.addHeaderView(headerView);
        } else {
            mTimersList.setBackgroundColor(getResources().getColor(R.color.blackish));
        }

        mNewTimerPage = v.findViewById(R.id.new_timer_page);
        mTimersListPage = v.findViewById(R.id.timers_list_page);