<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.google.fitness.activity/other"/>
</intent-filter>
+ </activity>
+ <activity
+ android:name=".ListActivity"
+ android:label="@string/result_list">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
--- /dev/null
+package net.osdn.gokigen.joggingtimer;
+
+import android.os.Bundle;
+import android.support.wearable.activity.WearableActivity;
+import android.support.wear.widget.WearableRecyclerView;
+import android.util.Log;
+
+public class ListActivity extends WearableActivity
+{
+ private final String TAG = toString();
+
+ /**
+ *
+ */
+ @Override
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ Log.v(TAG, "onCreate()");
+
+ setContentView(R.layout.activity_list);
+
+ // Enables Always-on
+ setAmbientEnabled();
+ }
+
+ /**
+ *
+ */
+ @Override
+ protected void onSaveInstanceState(Bundle outState)
+ {
+ super.onSaveInstanceState(outState);
+ }
+
+ /**
+ *
+ */
+ @Override
+ protected void onRestoreInstanceState(Bundle savedInstanceState)
+ {
+ super.onRestoreInstanceState(savedInstanceState);
+ }
+
+ /**
+ *
+ */
+ @Override
+ protected void onResume()
+ {
+ super.onResume();
+ Log.v(TAG, "onResume()");
+ }
+
+ /**
+ *
+ */
+ @Override
+ protected void onPause()
+ {
+ super.onPause();
+ Log.v(TAG, "onPause()");
+ }
+
+ /**
+ *
+ *
+ */
+ @Override
+ public void onStart()
+ {
+ super.onStart();
+ Log.v(TAG, "onStart()");
+ }
+
+ /**
+ *
+ *
+ */
+ @Override
+ public void onStop()
+ {
+ super.onStop();
+ Log.v(TAG, "onStop()");
+ }
+
+ /**
+ *
+ *
+ */
+ @Override
+ public void onEnterAmbient(Bundle ambientDetails)
+ {
+ super.onEnterAmbient(ambientDetails);
+ Log.v(TAG, "onEnterAmbient()");
+ }
+
+ /**
+ *
+ *
+ */
+ @Override
+ public void onExitAmbient()
+ {
+ super.onExitAmbient();
+ Log.v(TAG, "onExitAmbient()");
+ }
+
+ /**
+ *
+ *
+ */
+ @Override
+ public void onUpdateAmbient()
+ {
+ super.onUpdateAmbient();
+ Log.v(TAG, "onUpdateAmbient()");
+ }
+
+}
@Override
public void clickedBtn2()
{
+ ITimerCounter timerCounter = counter;
+ if (timerCounter != null)
+ {
+ if (!timerCounter.isStarted())
+ {
+ // 停止中は、記録一覧を呼び出す
+ launchListActivity();
+ }
+ }
updateTimerLabel();
}
}
}
+ /**
+ * Launch ListActivity
+ *
+ */
+ private void launchListActivity()
+ {
+ Log.v(TAG, "launchListActivity()");
+ try
+ {
+ Intent intent = new Intent(this, ListActivity.class);
+ startActivity(intent);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
/*
*
*
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/time_list"
+ android:orientation="vertical"
+ android:scrollbarAlwaysDrawVerticalTrack="true">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/list_title_area"
+ android:text="@string/result_list"
+ android:textAlignment="center"
+ android:clickable="true"
+ android:focusable="true"
+ />
+ <android.support.wear.widget.WearableRecyclerView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/recycler_list_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scrollbars="vertical"
+ >
+
+ </android.support.wear.widget.WearableRecyclerView>
+
+
+</LinearLayout>
android:clickable="true"
android:focusable="true"
android:scaleType="fitCenter"
- android:visibility="invisible"
+ android:visibility="visible"
android:contentDescription="@string/blank"
- android:src="@drawable/ic_location_off_black_24dp"
+ android:src="@drawable/ic_format_list_bulleted_black_24dp"
/>
<ImageButton
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/time_list"
+ android:orientation="vertical"
+ android:scrollbarAlwaysDrawVerticalTrack="true">
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/list_title_area"
+ android:text="@string/result_list"
+ android:textAlignment="center"
+ android:clickable="true"
+ android:focusable="true"
+ />
+ <android.support.wear.widget.WearableRecyclerView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/recycler_list_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scrollbars="vertical"
+ >
+
+ </android.support.wear.widget.WearableRecyclerView>
+
+
+</LinearLayout>
android:clickable="true"
android:focusable="true"
android:scaleType="fitEnd"
- android:visibility="invisible"
+ android:visibility="visible"
android:contentDescription="@string/blank"
- android:src="@drawable/ic_location_off_black_24dp"
+ android:src="@drawable/ic_format_list_bulleted_black_24dp"
/>
<ImageButton
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">JoggingTimer</string>
+ <string name="result_list">記録</string>
<string name="app_title">ジョギングタイマ</string>
<string name="blank"> </string>
<string name="counter">0:00\'00\"0</string>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">JoggingTimer</string>
+ <string name="result_list">Records</string>
<string name="app_title">Jogging Timer</string>
<string name="blank"> </string>
<string name="counter">0:00\'00\"0</string>