Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/am0c/LogViewer into am0c-…
Browse files Browse the repository at this point in the history
…master
  • Loading branch information
am0c committed Jan 9, 2011
2 parents 16aac50 + 6f0afbb commit aa3c867
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 75 deletions.
2 changes: 0 additions & 2 deletions apps/android/res/drawable/button_background_checked.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
android:centerColor="#364c73"
android:startColor="#203a66"
android:endColor="#445f91" />
<padding android:left="8dp" android:top="10dp"
android:right="8dp" android:bottom="10dp" />
</shape>
</item>
</layer-list>
2 changes: 0 additions & 2 deletions apps/android/res/drawable/button_background_focused.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
android:centerColor="#364c73"
android:startColor="#203a66"
android:endColor="#445f91" />
<padding android:left="8dp" android:top="10dp"
android:right="8dp" android:bottom="10dp" />
</shape>
</item>
</layer-list>
2 changes: 0 additions & 2 deletions apps/android/res/drawable/button_background_normal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
android:centerColor="#273753"
android:startColor="#273652"
android:endColor="#374d76" />
<padding android:left="8dp" android:top="10dp"
android:right="8dp" android:bottom="10dp" />
</shape>
</item>
</layer-list>
2 changes: 0 additions & 2 deletions apps/android/res/drawable/button_background_pressed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
android:centerColor="#273753"
android:startColor="#304468"
android:endColor="#273652" />
<padding android:left="8dp" android:top="10dp"
android:right="8dp" android:bottom="10dp" />
</shape>
</item>
</layer-list>
145 changes: 78 additions & 67 deletions apps/android/res/layout/viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,82 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical|right"
android:background="#1a2436"
android:paddingTop="1dip"
android:paddingBottom="1dip">

<ImageButton
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_prev"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_top"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_bottom"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_next"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_today"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_refresh"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
</LinearLayout>
<ListView
android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
<ImageButton
android:id="@+id/gesture_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
android:background="@drawable/finger" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#1a2436"
android:paddingTop="1dip"
android:paddingBottom="1dip">

<ImageButton
android:id="@+id/button6"
android:layout_alignParentRight="true"
android:layout_width="40dip"
android:layout_height="50dip"
android:src="@drawable/ic_refresh"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button5"
android:layout_toLeftOf="@id/button6"
android:layout_width="40dip"
android:layout_height="50dip"
android:src="@drawable/ic_today"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button4"
android:layout_toLeftOf="@id/button5"
android:layout_width="40dip"
android:layout_height="50dip"
android:src="@drawable/ic_next"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button3"
android:layout_toLeftOf="@id/button4"
android:layout_width="40dip"
android:layout_height="50dip"
android:src="@drawable/ic_bottom"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button2"
android:layout_toLeftOf="@id/button3"
android:layout_width="40dip"
android:layout_height="50dip"
android:src="@drawable/ic_top"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button1"
android:layout_toLeftOf="@id/button2"
android:layout_width="40dip"
android:layout_height="50dip"
android:src="@drawable/ic_prev"
android:layout_marginLeft="1dip"
android:background="@drawable/button_background" />
<ImageButton
android:id="@+id/button_title"
android:layout_toLeftOf="@id/button1"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:background="@drawable/button_background" />
</RelativeLayout>
<ListView
android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
<ImageButton
android:id="@+id/gesture_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
android:background="@drawable/finger" />
</FrameLayout>
Binary file modified apps/android/res/raw/gestures
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,39 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
mList.setSelection(0);
}
else if (gestureName.equals("go_bottom")) {
ContextUtil.toast(this, "bottom");
mList.setSelection(mCursor.getCount());
}
else if (gestureName.equals("go_left")) {
ContextUtil.toast(this, "prev day");
try {
changeDate(prevDay(mStrDate));
refresh();
} catch (ParseException e) {
e.printStackTrace();
ContextUtil.toast(ViewerActivity.this, getString(R.string.error_internal));
}
}
else if (gestureName.equals("go_right")) {
ContextUtil.toast(this, "next day");
try {
changeDate(nextDay(mStrDate));
refresh();
} catch (ParseException e) {
e.printStackTrace();
ContextUtil.toast(ViewerActivity.this, getString(R.string.error_internal));
}
}
else if (gestureName.equals("triangle")) {
ContextUtil.toast(this, "today");
String strDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date(System.currentTimeMillis()));
changeDate(strDate);
refresh();
}
else if (gestureName.equals("circle")) {
ContextUtil.toast(this, "refresh");
refresh();
}
break;
}
}
Expand Down

0 comments on commit aa3c867

Please sign in to comment.