Skip to content

Some changes and optimizations to the ImageViewer class #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />

<application android:label="@string/app_name" android:icon="@drawable/icon_ipack">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:name=".ImageViewer"
android:label="@string/app_name">
<intent-filter>
Expand Down
Binary file added bin/ImageViewer.apk
Binary file not shown.
Binary file added bin/classes.dex
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/ImageViewer$1.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/ImageViewer.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/R$attr.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/R$drawable.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/R$id.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/R$layout.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/R$string.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/R$xml.class
Binary file not shown.
Binary file added bin/com/nfc/demo/imageviewer/R.class
Binary file not shown.
Binary file added bin/resources.ap_
Binary file not shown.
46 changes: 46 additions & 0 deletions gen/com/nfc/demo/imageviewer/R.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/

package com.nfc.demo.imageviewer;

public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f020000;
public static final int icon_ipack=0x7f020001;
public static final int image1=0x7f020002;
public static final int image2=0x7f020003;
public static final int image3=0x7f020004;
public static final int image4=0x7f020005;
}
public static final class id {
public static final int block_0_data=0x7f060007;
public static final int block_0_label=0x7f060006;
public static final int clear_but=0x7f060008;
public static final int image1=0x7f060009;
public static final int image2=0x7f06000a;
public static final int image3=0x7f06000b;
public static final int image4=0x7f06000c;
public static final int purchScanES1=0x7f060004;
public static final int purchScanTable1=0x7f060000;
public static final int status_data=0x7f060003;
public static final int status_label=0x7f060002;
public static final int table1Row1=0x7f060001;
public static final int table1Row2=0x7f060005;
}
public static final class layout {
public static final int main=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f050001;
public static final int hello=0x7f050000;
}
public static final class xml {
public static final int filter_nfc=0x7f040000;
}
}
Binary file removed res/drawable-mdpi/image1.JPG
Binary file not shown.
Binary file added res/drawable-mdpi/image1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-mdpi/image2.JPG
Binary file not shown.
Binary file added res/drawable-mdpi/image2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-mdpi/image3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-mdpi/image4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/image5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/image6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 61 additions & 85 deletions res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -1,88 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/app_name">
<TableLayout
android:id="@+id/purchScanTable1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableRow
android:id="@+id/table1Row1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/status_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Current Status: " />
<TextView
android:id="@+id/status_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Scan a Tag" />
</TableRow>
<View
android:id="@+id/purchScanES1"
android:layout_width="match_parent"
android:layout_height="55px"
android:layout_below="@id/status_label"
android:background="#000000" />
<TableRow
android:id="@+id/table1Row2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/block_0_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BLOCK 0: " />
<TextView
android:id="@+id/block_0_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" " />
</TableRow>
</TableLayout>
<View
android:id="@+id/purchScanES1"
android:layout_width="match_parent"
android:layout_height="75px"
android:layout_below="@id/purchScanTable1"
android:background="#000000" />
<Button
android:id="@+id/clear_but"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/purchScanES1"
android:gravity="center_horizontal"
android:text="Clear" />
<ImageView
android:id="@+id/image1"
android:src="@drawable/image1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

/>
<ImageView
android:id="@+id/image2"
android:src="@drawable/image2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

/>
<ImageView
android:id="@+id/image3"
android:src="@drawable/image3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

/>
<ImageView
android:id="@+id/image4"
android:src="@drawable/image4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/app_name">
<TableLayout
android:id="@+id/purchScanTable1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableRow
android:id="@+id/table1Row1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/status_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Current Status: " />
<TextView
android:id="@+id/status_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Scan a Tag" />
</TableRow>

<TableRow
android:id="@+id/table1Row2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/block_0_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BLOCK 0: " />
<TextView
android:id="@+id/block_0_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" " />
</TableRow>
</TableLayout>
<View
android:id="@+id/purchScanES1"
android:layout_width="match_parent"
android:layout_height="20dip"
android:layout_below="@id/purchScanTable1"
android:background="#000000" />
<Button
android:id="@+id/clear_but"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/purchScanES1"
android:gravity="center_horizontal"
android:text="Clear" />

<ImageView
android:id="@+id/image"
android:src="@drawable/image1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />

</RelativeLayout>
Loading