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

Commit 386d8b05 authored by Sam Blitzstein's avatar Sam Blitzstein Committed by Itzhak Katzenelson
Browse files

Moving buttons for timer and stopwatch to the circle.

Also:
Ifa31068794c1bd94dfe2cf0d9234a80082375617
Fixed merge and usability problem in red-line.

Bug: 7257616
Bug: 7238147
Bug: 7238185
Bug: 7271163
Change-Id: I0ec99a83ba5bdefbd175361829fd96e48c1d5a32
parent 754d8f65
Loading
Loading
Loading
Loading
+52 −61
Original line number Diff line number Diff line
@@ -13,17 +13,13 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.deskclock.CircleButtonsLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/stopwatch_circle"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:orientation="horizontal"
    android:paddingTop="?android:attr/actionBarSize" >

    <LinearLayout
        android:layout_width="match_parent"
        android:baselineAligned="false"
        android:layout_weight="1"
        android:layout_height="0dip" >
    <FrameLayout
        android:layout_width="0dip"
        android:layout_height="match_parent"
@@ -36,58 +32,53 @@
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center" />

        <com.android.deskclock.CircleTimerView
            android:id="@+id/stopwatch_time"
                android:background="@null"
            android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </FrameLayout>
        <ListView
            android:id="@+id/laps_list"
            android:layout_weight="1"
            android:layout_marginLeft="@dimen/laps_margin"
            android:layout_marginRight="@dimen/laps_margin"
            android:layout_gravity="center"
            android:layout_width="0dip"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <View
        android:layout_width="match_parent"
        android:layout_height="1dip"
        android:background="#28ffffff" />
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="48dip" >
            android:layout_height="match_parent"
            android:background="@null" />

        <ImageButton
            android:id="@+id/stopwatch_left_button"
            android:layout_gravity="bottom|left"
            android:layout_width="56dip"
            style="@style/button"
            android:src="@drawable/ic_lap"
            android:background="@null"
            android:layout_height="match_parent" />
        <Space
            android:layout_height="match_parent"
            android:layout_width="0dip"
            android:layout_weight="1"/>
            android:layout_height="56dip" />

        <TextView
            android:id="@+id/stopwatch_stop"
            android:layout_gravity="bottom|center_horizontal"
            android:gravity="center"
            android:layout_marginBottom="0dip"
            android:paddingLeft="10dip"
            android:paddingRight="10dip"
            android:paddingBottom="5dip"
            android:paddingTop="5dip"
            android:text="@string/timer_stop"
            android:layout_width="wrap_content"
            style="@style/bold_button"
            android:contentDescription="@string/timer_stop"
            android:layout_height="wrap_content" />

        <ImageButton
            android:id="@+id/stopwatch_share_button"
            android:background="@null"
            android:src="@drawable/ic_share"
            android:layout_width="56dip"
            style="@style/button"
            android:contentDescription="@string/sw_share_button"
            android:layout_height="match_parent" />
        <Space
            android:layout_height="match_parent"
            android:layout_width="0dip"
            android:layout_weight="1"/>
        <ImageButton
            android:id="@+id/stopwatch_right_button"
            android:background="?android:attr/selectableItemBackground"
            android:layout_width="56dip"
            android:src="@drawable/ic_start_normal"
            android:src="@drawable/ic_share"
            style="@style/button"
            android:layout_height="match_parent" />
    </LinearLayout>
            android:layout_gravity="bottom|right"
            android:layout_height="56dip" />
    </FrameLayout>

</LinearLayout>
    <ListView
        android:id="@+id/laps_list"
        android:layout_weight="1"
        android:layout_marginLeft="@dimen/laps_margin"
        android:layout_marginRight="@dimen/laps_margin"
        android:layout_gravity="center"
        android:layout_width="0dip"
        android:layout_height="wrap_content" />
</com.android.deskclock.CircleButtonsLinearLayout>
+39 −31
Original line number Diff line number Diff line
@@ -15,13 +15,17 @@
-->

<!-- timer item in the list of active timers -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:gravity="center"
<com.android.deskclock.CircleButtonsLinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/timer_circle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    android:layout_height="wrap_content"
    android:gravity="center"
    android:orientation="vertical" >

    <FrameLayout
        android:layout_width="@dimen/timer_circle_diameter"
        android:id="@+id/timer_frame"
        android:layout_width="@dimen/timer_circle_width"
        android:layout_height="@dimen/timer_circle_diameter"
        android:layout_marginLeft="@dimen/circle_margin"
        android:layout_marginRight="@dimen/circle_margin">
@@ -36,37 +40,41 @@
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"/>
    </FrameLayout>
    <LinearLayout
        android:layout_width="48dip"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <ImageButton
            android:id="@+id/timer_delete"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:src="@drawable/ic_delete"
            style="@style/button"
            android:background="@null"
            android:contentDescription="@string/timer_delete"
            android:layout_height="48dip" />

        <ImageButton
            android:id="@+id/timer_plus_one"
            android:background="@null"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:layout_width="56dip"
            android:layout_gravity="bottom|left"
            android:src="@drawable/ic_plusone"
            style="@style/button"
            android:background="@null"
            android:contentDescription="@string/timer_plus_one"
            android:layout_height="48dip" />
        <ImageButton
            android:layout_height="56dip" />

        <TextView
            android:id="@+id/timer_stop"
            android:background="?android:attr/selectableItemBackground"
            android:src="@drawable/ic_stop_normal"
            android:layout_weight="1"
            android:layout_width="match_parent"
            android:layout_gravity="bottom|center_horizontal"
            android:gravity="center"
            android:layout_marginBottom="0dip"
            android:paddingLeft="10dip"
            android:paddingRight="10dip"
            android:paddingBottom="5dip"
            android:paddingTop="5dip"
            android:layout_width="wrap_content"
            android:text="@string/timer_stop"
            style="@style/bold_button"
            android:contentDescription="@string/timer_stop"
            android:layout_height="wrap_content" />

        <ImageButton
            android:id="@+id/timer_delete"
            android:background="@null"
            android:src="@drawable/ic_delete"
            android:layout_gravity="bottom|right"
            android:layout_width="56dip"
            android:contentDescription="@string/timer_delete"
            style="@style/button"
            android:layout_height="48dip" />
    </LinearLayout>
</LinearLayout>
            android:layout_height="56dip" />
    </FrameLayout>

</com.android.deskclock.CircleButtonsLinearLayout>
+36 −40
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.deskclock.CircleButtonsLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/stopwatch_circle"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingTop="?android:attr/actionBarSize"
@@ -33,53 +34,48 @@
            android:layout_gravity="center"/>
        <com.android.deskclock.CircleTimerView
            android:id="@+id/stopwatch_time"
            android:background="@null"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        </FrameLayout>
            android:layout_height="match_parent"
            android:background="@null" />

    <ListView
        android:id="@+id/laps_list"
        android:layout_weight="2"
        android:layout_width="match_parent"
        android:layout_height="0dip" />
    <View
        android:layout_width="match_parent"
        android:layout_height="1dip"
        android:background="#28ffffff" />
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="48dip" >
        <ImageButton
            android:id="@+id/stopwatch_left_button"
            android:layout_width="56dip"
            style="@style/button"
            android:src="@drawable/ic_lap"
            android:layout_width="56dip"
            android:layout_height="56dip"
            android:layout_gravity="bottom|left"
            android:background="@null"
            android:layout_height="match_parent" />
        <Space
            android:layout_height="match_parent"
            android:layout_width="0dip"
            android:layout_weight="1"/>
            android:src="@drawable/ic_lap" />

        <TextView
            android:id="@+id/stopwatch_stop"
            style="@style/bold_button"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="bottom|center_horizontal"
            android:gravity="center"
            android:layout_marginBottom="0dip"
            android:contentDescription="@string/timer_stop"
            android:paddingLeft="10dip"
            android:paddingRight="10dip"
            android:paddingBottom="5dip"
            android:paddingTop="5dip"
            android:text="@string/timer_stop" />

        <ImageButton
            android:id="@+id/stopwatch_share_button"
            android:background="@null"
            android:src="@drawable/ic_share"
            android:layout_width="56dip"
            style="@style/button"
            android:contentDescription="@string/sw_share_button"
            android:layout_height="match_parent" />
        <Space
            android:layout_height="match_parent"
            android:layout_width="0dip"
            android:layout_weight="1"/>
        <ImageButton
            android:id="@+id/stopwatch_right_button"
            android:background="?android:attr/selectableItemBackground"
            android:layout_width="56dip"
            android:src="@drawable/ic_start_normal"
            style="@style/button"
            android:layout_height="match_parent" />
    </LinearLayout>
            android:layout_height="56dip"
            android:layout_gravity="bottom|right"
            android:background="@null"
            android:src="@drawable/ic_share" />
    </FrameLayout>

    <ListView
        android:id="@+id/laps_list"
        android:layout_weight="2"
        android:layout_width="match_parent"
        android:layout_height="0dip" />

</LinearLayout>
</com.android.deskclock.CircleButtonsLinearLayout>
 No newline at end of file
+35 −28
Original line number Diff line number Diff line
@@ -15,12 +15,16 @@
-->

<!-- timer item in the list of active timers -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.deskclock.CircleButtonsLinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/timer_circle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/timer_frame"
        android:layout_width="match_parent"
        android:layout_height="@dimen/timer_circle_diameter"
        android:layout_marginLeft="@dimen/circle_margin"
@@ -36,38 +40,41 @@
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"/>
    </FrameLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="12dp"
        android:paddingBottom="12dp" >
        <ImageButton
            android:id="@+id/timer_delete"
            android:src="@drawable/ic_delete"
            android:layout_width="0dip"
            android:layout_weight="1"
            style="@style/button"
            android:background="@null"
            android:contentDescription="@string/timer_delete"
            android:layout_height="48dip" />

        <ImageButton
            android:id="@+id/timer_plus_one"
            android:src="@drawable/ic_plusone"
            android:background="@null"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_width="56dip"
            android:layout_gravity="bottom|left"
            style="@style/button"
            android:contentDescription="@string/timer_plus_one"
            android:layout_height="48dip" />
        <ImageButton
            android:layout_height="56dip" />

        <TextView
            android:id="@+id/timer_stop"
            android:src="@drawable/ic_stop_normal"
            android:background="?android:attr/selectableItemBackground"
            android:layout_weight="1"
            android:layout_width="0dip"
            android:layout_gravity="bottom|center_horizontal"
            android:gravity="center"
            android:layout_marginBottom="0dip"
            android:paddingLeft="10dip"
            android:paddingRight="10dip"
            android:paddingBottom="5dip"
            android:paddingTop="5dip"
            android:text="@string/timer_stop"
            android:layout_width="wrap_content"
            style="@style/bold_button"
            android:contentDescription="@string/timer_stop"
            android:layout_height="wrap_content" />

        <ImageButton
            android:id="@+id/timer_delete"
            android:src="@drawable/ic_delete"
            android:background="@null"
            android:layout_gravity="bottom|right"
            android:layout_width="56dip"
            android:contentDescription="@string/timer_delete"
            style="@style/button"
            android:layout_height="48dip" />
    </LinearLayout>
</LinearLayout>
            android:layout_height="56dip" />
    </FrameLayout>

</com.android.deskclock.CircleButtonsLinearLayout>
+3 −2
Original line number Diff line number Diff line
@@ -34,12 +34,13 @@
    <dimen name="dialpad_font_size">24sp</dimen>

    <dimen name="timer_circle_diameter">240dip</dimen>
    <dimen name="timer_circle_width">400dip</dimen>
    <dimen name="actionbar_tab_padding">50dip</dimen>

    <!-- Size of margin for circles. -->
    <dimen name="circle_margin">8dp</dimen>
    <dimen name="laps_margin">16dp</dimen>

    <dimen name="glowpadview_margin_bottom">0dip</dimen>
    <dimen name="glowpadview_margin_right">-64dip</dimen>
    <!-- Extra offset for timer button paddings. Only nonzero for non-tablets. -->
    <dimen name="timer_button_extra_offset">45dip</dimen>
</resources>
Loading