• R/O
  • HTTP
  • SSH
  • HTTPS

JoggingTimer: コミット

A jogging timer for Android wear.


コミットメタ情報

リビジョン04110a3f45f6b07779e915c8221921aeb84445e0 (tree)
日時2018-04-22 21:50:20
作者MRSa <mrsa@myad...>
コミッターMRSa

ログメッセージ

roundおよびchinの表示レイアウトを見直した。

変更サマリ

差分

--- a/mobile/build.gradle
+++ b/mobile/build.gradle
@@ -7,8 +7,8 @@ android {
77 applicationId "net.osdn.gokigen.joggingtimer"
88 minSdkVersion 14 // 14
99 targetSdkVersion 27
10- versionCode 100002
11- versionName "1.0.0"
10+ versionCode 100012
11+ versionName "1.0.1"
1212 }
1313 buildTypes {
1414 release {
--- a/wear/build.gradle
+++ b/wear/build.gradle
@@ -7,8 +7,8 @@ android {
77 applicationId "net.osdn.gokigen.joggingtimer"
88 minSdkVersion 23
99 targetSdkVersion 27
10- versionCode 100001
11- versionName "1.0.0"
10+ versionCode 100011
11+ versionName "1.0.1"
1212 }
1313 buildTypes {
1414 release {
--- a/wear/src/main/java/net/osdn/gokigen/joggingtimer/recorddetail/DetailActivity.java
+++ b/wear/src/main/java/net/osdn/gokigen/joggingtimer/recorddetail/DetailActivity.java
@@ -56,7 +56,8 @@ public class DetailActivity extends WearableActivity implements RecordDetailSetu
5656 detailAdapter = new RecordDetailAdapter();
5757 WearableLinearLayoutManager layoutManager = new WearableLinearLayoutManager(this);
5858
59- view.setCircularScrollingGestureEnabled(getResources().getConfiguration().isScreenRound());
59+ //view.setCircularScrollingGestureEnabled(getResources().getConfiguration().isScreenRound());
60+ view.setCircularScrollingGestureEnabled(false);
6061
6162 DividerItemDecoration dividerDecoration = new DividerItemDecoration(view.getContext(), layoutManager.getOrientation());
6263
--- a/wear/src/main/java/net/osdn/gokigen/joggingtimer/recordlist/ListActivity.java
+++ b/wear/src/main/java/net/osdn/gokigen/joggingtimer/recordlist/ListActivity.java
@@ -55,7 +55,8 @@ public class ListActivity extends WearableActivity implements IDetailLauncher, R
5555 summaryAdapter = new RecordSummaryAdapter();
5656 WearableLinearLayoutManager layoutManager = new WearableLinearLayoutManager(this);
5757
58- view.setCircularScrollingGestureEnabled(getResources().getConfiguration().isScreenRound());
58+ //view.setCircularScrollingGestureEnabled(getResources().getConfiguration().isScreenRound());
59+ view.setCircularScrollingGestureEnabled(false);
5960
6061 DividerItemDecoration dividerDecoration = new DividerItemDecoration(view.getContext(), layoutManager.getOrientation());
6162
--- a/wear/src/main/java/net/osdn/gokigen/joggingtimer/utilities/ConfirmationDialog.java
+++ b/wear/src/main/java/net/osdn/gokigen/joggingtimer/utilities/ConfirmationDialog.java
@@ -8,6 +8,7 @@ import android.content.DialogInterface;
88 import android.os.Bundle;
99 import android.support.annotation.NonNull;
1010 import android.util.Log;
11+import android.view.ContextThemeWrapper;
1112
1213 import net.osdn.gokigen.joggingtimer.R;
1314
@@ -64,7 +65,9 @@ public class ConfirmationDialog extends DialogFragment
6465 message = savedInstanceState.getString("message");
6566 }
6667 Context context = getContext();
68+ //AlertDialog.Builder alertDialog = new AlertDialog.Builder(new ContextThemeWrapper(context, R.style.wear2_dialog_theme));
6769 AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);
70+
6871 alertDialog.setTitle(title);
6972 alertDialog.setIcon(android.R.drawable.ic_dialog_alert);
7073 alertDialog.setMessage(message);
--- a/wear/src/main/java/net/osdn/gokigen/joggingtimer/utilities/CreateModelDataDialog.java
+++ b/wear/src/main/java/net/osdn/gokigen/joggingtimer/utilities/CreateModelDataDialog.java
@@ -75,7 +75,8 @@ public class CreateModelDataDialog extends DialogFragment
7575
7676 Activity activity = getActivity();
7777 // 確認ダイアログの生成
78- final AlertDialog.Builder alertDialog = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.wear2_dialog_theme));
78+ //final AlertDialog.Builder alertDialog = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.wear2_dialog_theme));
79+ final AlertDialog.Builder alertDialog = new AlertDialog.Builder(activity);
7980
8081 // Get the layout inflater
8182 LayoutInflater inflater = activity.getLayoutInflater();
--- a/wear/src/main/java/net/osdn/gokigen/joggingtimer/utilities/DataEditDialog.java
+++ b/wear/src/main/java/net/osdn/gokigen/joggingtimer/utilities/DataEditDialog.java
@@ -7,15 +7,20 @@ import android.app.DialogFragment;
77 import android.content.Context;
88 import android.content.DialogInterface;
99 import android.content.res.TypedArray;
10+import android.graphics.Color;
11+import android.graphics.drawable.Drawable;
12+import android.os.Build;
1013 import android.os.Bundle;
1114 import android.support.annotation.NonNull;
1215 import android.util.Log;
16+import android.view.ContextThemeWrapper;
1317 import android.view.LayoutInflater;
1418 import android.view.View;
1519 import android.view.ViewGroup;
1620 import android.widget.AdapterView;
1721 import android.widget.ArrayAdapter;
1822 import android.widget.EditText;
23+import android.widget.LinearLayout;
1924 import android.widget.Spinner;
2025 import android.widget.TextView;
2126
@@ -73,8 +78,10 @@ public class DataEditDialog extends DialogFragment
7378 Activity activity = getActivity();
7479
7580 // 確認ダイアログの生成
81+ //final AlertDialog.Builder alertDialog = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.wear2_dialog_theme));
7682 final AlertDialog.Builder alertDialog = new AlertDialog.Builder(activity);
7783
84+
7885 // Get the layout inflater
7986 LayoutInflater inflater = activity.getLayoutInflater();
8087 final View alertView = inflater.inflate(R.layout.information_dialog, null, false);
@@ -83,6 +90,13 @@ public class DataEditDialog extends DialogFragment
8390 final String[] objects = activity.getResources().getStringArray(R.array.icon_selection_id);
8491 final Spinner spinner = alertView.findViewById(R.id.spinner_selection);
8592 final EditText titleText = alertView.findViewById(R.id.edit_title);
93+
94+ // もー苦肉の策だ。。。
95+ if (Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.M)
96+ {
97+ titleText.setTextColor(Color.BLACK);
98+ }
99+
86100 try
87101 {
88102 titleText.setText(title);
--- a/wear/src/main/res/layout-round/activity_detail.xml
+++ b/wear/src/main/res/layout-round/activity_detail.xml
@@ -32,6 +32,12 @@
3232 android:layout_width="match_parent"
3333 android:layout_height="match_parent"
3434 android:scrollbars="vertical"
35+ android:clipChildren="true"
36+ android:clipToPadding="true"
37+ android:paddingTop="@dimen/list_top_padding"
38+ android:paddingBottom="@dimen/list_bottom_padding"
39+ android:paddingStart="@dimen/list_start_padding"
40+ android:paddingEnd="@dimen/list_end_padding"
3541 >
3642 </android.support.wear.widget.WearableRecyclerView>
3743 </LinearLayout>
--- a/wear/src/main/res/layout-round/activity_list.xml
+++ b/wear/src/main/res/layout-round/activity_list.xml
@@ -7,10 +7,12 @@
77 android:layout_width="match_parent"
88 android:layout_height="match_parent"
99 android:background="@color/black"
10+ android:layoutMode="clipBounds"
1011 tools:context="net.osdn.gokigen.joggingtimer.recordlist.ListActivity">
1112
12- <LinearLayout
13+ <android.support.wear.widget.BoxInsetLayout
1314 xmlns:android="http://schemas.android.com/apk/res/android"
15+ xmlns:tools="http://schemas.android.com/tools"
1416 android:layout_width="match_parent"
1517 android:layout_height="match_parent"
1618 android:id="@+id/time_list"
@@ -31,10 +33,16 @@
3133 android:id="@+id/recycler_list_view"
3234 android:layout_width="match_parent"
3335 android:layout_height="match_parent"
36+ android:clipChildren="true"
37+ android:clipToPadding="true"
38+ android:paddingTop="@dimen/list_top_padding"
39+ android:paddingBottom="@dimen/list_bottom_padding"
40+ android:paddingStart="@dimen/list_start_padding"
41+ android:paddingEnd="@dimen/list_end_padding"
3442 android:scrollbars="vertical"
3543 >
3644 </android.support.wear.widget.WearableRecyclerView>
37- </LinearLayout>
45+ </android.support.wear.widget.BoxInsetLayout>
3846
3947 <android.support.wear.widget.drawer.WearableNavigationDrawerView
4048 android:id="@+id/list_top_navigation_drawer"
--- a/wear/src/main/res/layout-round/column_detail.xml
+++ b/wear/src/main/res/layout-round/column_detail.xml
@@ -3,6 +3,10 @@
33 android:layout_width="fill_parent"
44 android:layout_height="wrap_content"
55 android:orientation="horizontal"
6+ android:clipChildren="true"
7+ android:clipToPadding="true"
8+ android:paddingTop="@dimen/header_top_padding"
9+ android:paddingBottom="@dimen/header_bottom_padding"
610 >
711 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
812 android:id="@+id/detail_lap_count"
--- a/wear/src/main/res/layout-round/column_laptime.xml
+++ b/wear/src/main/res/layout-round/column_laptime.xml
@@ -4,6 +4,10 @@
44 android:layout_height="wrap_content"
55 android:orientation="horizontal"
66 android:id="@+id/laptime_item"
7+ android:clipChildren="true"
8+ android:clipToPadding="true"
9+ android:paddingTop="@dimen/header_top_padding"
10+ android:paddingBottom="@dimen/header_bottom_padding"
711 >
812 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
913 android:layout_width="wrap_content"
--- a/wear/src/main/res/layout-round/column_list.xml
+++ b/wear/src/main/res/layout-round/column_list.xml
@@ -3,6 +3,10 @@
33 android:layout_width="fill_parent"
44 android:layout_height="wrap_content"
55 android:orientation="horizontal"
6+ android:clipChildren="true"
7+ android:clipToPadding="true"
8+ android:paddingTop="@dimen/header_top_padding"
9+ android:paddingBottom="@dimen/header_bottom_padding"
610 >
711 <ImageView xmlns:android="http://schemas.android.com/apk/res/android"
812 android:id="@+id/gokigen_icon"
--- a/wear/src/main/res/layout-round/icon_list.xml
+++ b/wear/src/main/res/layout-round/icon_list.xml
@@ -4,16 +4,16 @@
44 android:orientation="horizontal"
55 android:layout_width="fill_parent"
66 android:layout_height="fill_parent"
7- android:padding="12dp"
7+ android:padding="@dimen/icon_list_padding"
88 android:background="@color/white"
99 >
1010 <TextView android:id="@+id/selection_icon"
1111 android:layout_width="fill_parent"
1212 android:layout_height="fill_parent"
1313 android:contentDescription="@string/blank"
14- android:drawableTint="@color/black"
1514 android:foregroundTint="@color/black"
15+ android:drawableTint="@color/black"
1616 android:drawableEnd="@drawable/ic_build_black_24dp"
17- android:layout_marginEnd="12dp"
17+ android:layout_marginEnd="6dp"
1818 />
1919 </LinearLayout>
--- a/wear/src/main/res/layout-round/information_dialog.xml
+++ b/wear/src/main/res/layout-round/information_dialog.xml
@@ -1,23 +1,27 @@
11 <?xml version="1.0" encoding="utf-8"?>
2-<android.support.wear.widget.drawer.WearableDrawerLayout
2+
3+<android.support.wear.widget.BoxInsetLayout
34 xmlns:android="http://schemas.android.com/apk/res/android"
45 android:id="@+id/list_drawer_layout"
56 android:layout_width="match_parent"
67 android:layout_height="match_parent"
78 android:nestedScrollingEnabled="true"
8- android:background="@color/white">
9+ android:paddingStart="@dimen/list_start_padding"
10+ android:paddingEnd="@dimen/list_end_padding"
11+ android:background="@color/white"
12+>
913 <ScrollView
1014 android:layout_width="match_parent"
11- android:layout_height="wrap_content">
15+ android:layout_height="wrap_content"
16+ >
1217
1318 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
1419 android:id="@+id/info_edit_data"
1520 android:orientation="vertical"
1621 android:layout_width="fill_parent"
1722 android:layout_height="wrap_content"
18- android:padding="6dp"
23+ android:padding="2dp"
1924 >
20-
2125 <Spinner
2226 android:id="@+id/spinner_selection"
2327 android:layout_width="fill_parent"
@@ -38,4 +42,4 @@
3842 />
3943 </LinearLayout>
4044 </ScrollView>
41-</android.support.wear.widget.drawer.WearableDrawerLayout>
45+</android.support.wear.widget.BoxInsetLayout>
--- a/wear/src/main/res/layout-round/time_model_picker.xml
+++ b/wear/src/main/res/layout-round/time_model_picker.xml
@@ -43,7 +43,7 @@
4343 android:id="@+id/number_picker_lap_count"
4444 android:layout_width="wrap_content"
4545 android:layout_height="wrap_content"
46- android:layout_weight="4"
46+ android:layout_weight="2"
4747 />
4848 <TextView
4949 android:id="@+id/lap_end"
@@ -76,7 +76,7 @@
7676 android:id="@+id/number_picker_minutes"
7777 android:layout_width="wrap_content"
7878 android:layout_height="wrap_content"
79- android:layout_weight="1"
79+ android:layout_weight="2"
8080 />
8181 <TextView
8282 android:id="@+id/separator_minute"
@@ -89,7 +89,7 @@
8989 android:id="@+id/number_picker_seconds"
9090 android:layout_width="wrap_content"
9191 android:layout_height="wrap_content"
92- android:layout_weight="1"
92+ android:layout_weight="2"
9393 />
9494 <TextView
9595 android:id="@+id/separator_second"
--- a/wear/src/main/res/values-round/dimens.xml
+++ b/wear/src/main/res/values-round/dimens.xml
@@ -1,15 +1,15 @@
11 <?xml version="1.0" encoding="utf-8"?>
22 <resources>
3- <!--
4- Because the window insets on round devices are larger than 15dp, this padding only applies
5- to square screens.
6- -->
7- <dimen name="box_inset_layout_padding">0dp</dimen>
83
9- <!--
10- This padding applies to both square and round screens. The total padding between the buttons
11- and the window insets is box_inset_layout_padding (above variable) on square screens and
12- inner_frame_layout_padding (below variable) on round screens.
13- -->
4+ <dimen name="box_inset_layout_padding">0dp</dimen>
145 <dimen name="inner_frame_layout_padding">1dp</dimen>
6+ <dimen name="icon_list_padding">12dp</dimen>
7+ <dimen name="header_top_padding">8dp</dimen>
8+ <dimen name="header_bottom_padding">6dp</dimen>
9+ <dimen name="header_start_padding">6dp</dimen>
10+ <dimen name="header_end_padding">6dp</dimen>
11+ <dimen name="list_start_padding">6dp</dimen>
12+ <dimen name="list_end_padding">6dp</dimen>
13+ <dimen name="list_top_padding">40dp</dimen>
14+ <dimen name="list_bottom_padding">40dp</dimen>
1515 </resources>
--- a/wear/src/main/res/values/dimens.xml
+++ b/wear/src/main/res/values/dimens.xml
@@ -12,4 +12,14 @@
1212 inner_frame_layout_padding (below variable) on round screens.
1313 -->
1414 <dimen name="inner_frame_layout_padding">0dp</dimen>
15+ <dimen name="icon_list_padding">0dp</dimen>
16+ <dimen name="header_start_padding">0dp</dimen>
17+ <dimen name="header_end_padding">0dp</dimen>
18+ <dimen name="header_top_padding">0dp</dimen>
19+ <dimen name="header_bottom_padding">0dp</dimen>
20+
21+ <dimen name="list_start_padding">0dp</dimen>
22+ <dimen name="list_end_padding">0dp</dimen>
23+ <dimen name="list_top_padding">0dp</dimen>
24+ <dimen name="list_bottom_padding">0dp</dimen>
1525 </resources>
旧リポジトリブラウザで表示