Skip to content

Commit

Permalink
Merge pull request #1 from iscanner/fix-camera
Browse files Browse the repository at this point in the history
tweak style
  • Loading branch information
xudafeng committed Jul 26, 2015
2 parents 751082e + ea2a72c commit d4f9930
Show file tree
Hide file tree
Showing 24 changed files with 627 additions and 437 deletions.
14 changes: 11 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.iscanner.iscanner_android"
android:versionCode="1"
android:versionName="1.2.0" >
android:versionName="1.3.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="21" />
Expand All @@ -26,9 +26,17 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".HistoryActivity" >
<activity
android:name=".HistoryActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
<activity android:name=".AboutActivity" >
<activity
android:name=".AboutActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
</application>
</manifest>
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-14
target=android-19
1 change: 1 addition & 0 deletions res/anim/slide_left_in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<translate
android:duration="200"
android:fromXDelta="-100.0%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:toXDelta="0.0" />
</set>
1 change: 1 addition & 0 deletions res/anim/slide_left_out.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<translate
android:duration="200"
android:fromXDelta="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:toXDelta="-100.0%p" />
</set>
1 change: 1 addition & 0 deletions res/anim/slide_right_in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<translate
android:duration="200"
android:fromXDelta="100.0%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:toXDelta="0.0" />
</set>
1 change: 1 addition & 0 deletions res/anim/slide_right_out.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<translate
android:duration="200"
android:fromXDelta="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:toXDelta="100.0%p" />
</set>
22 changes: 12 additions & 10 deletions res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.github.iscanner.iscanner_android.MainActivity" >
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<include layout="@layout/title" />
</LinearLayout>
<TextView
android:id="@+id/copyright"
android:layout_width="wrap_content"
Expand All @@ -22,22 +24,22 @@
android:layout_height="20dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:gravity="center_vertical|center"
android:background="@color/transparent"
android:layout_marginBottom="0dp"
android:background="@color/transparent"
android:gravity="center_vertical|center"
android:height="20dp"
android:textSize="14sp"
android:text="@string/check_for_update"
android:textColor="@color/lightgrey" />
android:textColor="@color/lightgrey"
android:textSize="14sp" />
<ImageView
android:id="@+id/icon"
android:contentDescription="@string/app_name"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:alpha="0.6"
android:contentDescription="@string/app_name"
android:scaleType="centerInside"
android:src="@drawable/ic_logo" />
</RelativeLayout>
11 changes: 8 additions & 3 deletions res/layout/activity_history.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<include
android:id="@+id/title_layout"
layout="@layout/title" />
<com.github.iscanner.iscanner_android.SwipeableCell
android:id="@+id/historyListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/qr_dialog"
android:layout_below="@id/title_layout"
android:divider="#dddbdb"
android:dividerHeight="1dp" >
</com.github.iscanner.iscanner_android.SwipeableCell>
Expand All @@ -19,12 +23,12 @@
android:visibility="gone" >
<ImageView
android:id="@+id/qr_image_view"
android:contentDescription="@string/app_name"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@color/white"
android:contentDescription="@string/app_name"
android:scaleType="centerInside"
android:src="@drawable/ic_logo"
android:visibility="visible" />
Expand All @@ -33,6 +37,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/qr_image_view"
android:gravity="center_vertical|center"
android:text="@string/tip_content"
Expand Down
25 changes: 13 additions & 12 deletions res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff">
android:background="#ffffff" >
<SurfaceView
android:id="@+id/preview_view"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<com.zxing.view.ViewfinderView
android:id="@+id/viewfinder_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<include layout="@layout/title" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:orientation="vertical" >
<TextView
android:id="@+id/copyright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="14dp"
android:gravity="center_vertical|center"
android:text="@string/copyright_content"
android:textColor="#0074ea" />
android:id="@+id/copyright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="14dp"
android:gravity="center_vertical|center"
android:text="@string/copyright_content"
android:textColor="#0074ea" />
</RelativeLayout>
</FrameLayout>
2 changes: 1 addition & 1 deletion res/layout/cell_body.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@color/lightgray"
android:background="@color/lightgrey"
android:drawableLeft="@drawable/qrcode"
android:focusable="false"
android:height="60dp"
Expand Down
19 changes: 12 additions & 7 deletions res/layout/title.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:id="@+id/title_layout"
android:layout_height="wrap_content" >
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="@color/gainsboro" >
<Button
android:id="@+id/button_first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerInParent="true"
android:background="@color/transparent"
android:gravity="center_vertical|left"
android:paddingLeft="10dp"
android:paddingLeft="6dp"
android:text="@string/back_name"
android:textColor="@color/title_button"
android:textSize="18sp"
android:visibility="invisible" />
<TextView
android:id="@+id/title"
Expand All @@ -24,17 +27,19 @@
android:shadowRadius="1"
android:text="@string/app_name"
android:textColor="@android:color/black"
android:textSize="20sp"
android:textSize="18sp"
android:textStyle="bold" />
<Button
android:id="@+id/button_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:background="@color/transparent"
android:gravity="center_vertical|right"
android:paddingRight="10dp"
android:paddingRight="6dp"
android:text="@string/history_name"
android:textColor="@color/title_button"
android:textSize="18sp"
android:visibility="invisible" />
</RelativeLayout>
1 change: 0 additions & 1 deletion res/values-v11/styles.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<resources>
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<item name="android:windowTitleSize">50dip</item>
<item name="android:windowAnimationStyle">@style/activityAnimation</item>
</style>
<style name="activityAnimation" parent="AppTheme">
Expand Down
1 change: 0 additions & 1 deletion res/values-v14/styles.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<resources>
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:windowTitleSize">50dip</item>
<item name="android:windowAnimationStyle">@style/activityAnimation</item>
</style>
<style name="activityAnimation" parent="AppTheme">
Expand Down
Loading

0 comments on commit d4f9930

Please sign in to comment.