Changeset 4 for trunk/TagTracker
- Timestamp:
- 05/03/12 22:18:02 (13 years ago)
- Location:
- trunk/TagTracker
- Files:
-
- 18 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TagTracker/AndroidManifest.xml
r3 r4 11 11 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 12 12 <application 13 android:icon="@drawable/ ic_launcher"13 android:icon="@drawable/tag_accept" 14 14 android:label="@string/app_name" 15 15 android:theme="@style/MyTheme"> -
trunk/TagTracker/gen/nl/deadpixel/tagtracker/beta/R.java
r3 r4 13 13 public static final class drawable { 14 14 public static final int ic_launcher=0x7f020000; 15 public static final int tag_accept=0x7f020001; 16 public static final int tb_offstate=0x7f020002; 17 public static final int tb_onstate=0x7f020003; 18 public static final int toggle_button=0x7f020004; 15 19 } 16 20 public static final class id { 17 public static final int Screen=0x7f070000; 18 public static final int status=0x7f070003; 19 public static final int text=0x7f070001; 20 public static final int zend=0x7f070002; 21 public static final int Screen=0x7f080000; 22 public static final int add_note=0x7f080005; 23 public static final int add_uid=0x7f080004; 24 public static final int status=0x7f080002; 25 public static final int stopsend=0x7f080006; 26 public static final int text=0x7f080001; 27 public static final int zend=0x7f080003; 21 28 } 22 29 public static final class layout { 23 30 public static final int main=0x7f030000; 31 } 32 public static final class menu { 33 public static final int lo_menu=0x7f070000; 24 34 } 25 35 public static final class string { … … 28 38 } 29 39 public static final class style { 40 public static final int ActionBar=0x7f060001; 41 public static final int ActionBar_Light=0x7f060003; 30 42 /** Any customizations for your app running on pre-3.0 devices here 31 Any customizations for your app running on post-3.0 devices here32 43 */ 33 44 public static final int MyTheme=0x7f060000; 45 public static final int ToggleButton=0x7f060002; 34 46 } 35 47 public static final class xml { -
trunk/TagTracker/res/layout/main.xml
r3 r4 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout 3 xmlns:android="http://schemas.android.com/apk/res/android"2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:id="@+id/Screen" 4 4 android:layout_width="fill_parent" 5 android:layout_height="fill_parent" 6 android:id="@+id/Screen" > 7 <TextView 8 android:id="@+id/text" 9 android:layout_width="fill_parent" 10 android:layout_height="wrap_content" 11 android:layout_above="@+id/zend" 12 android:layout_alignParentLeft="true" 13 android:layout_alignParentTop="true" /> 14 15 <Button 16 android:id="@+id/zend" 17 android:layout_width="match_parent" 18 android:layout_height="wrap_content" 19 android:layout_above="@+id/status" 20 android:layout_alignParentLeft="true" 21 android:text="Verzenden" /> 22 23 <ToggleButton 24 android:id="@+id/status" 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:layout_alignParentBottom="true" 28 android:layout_alignParentLeft="true" 29 android:onClick="onToggleClicked" 30 android:text="ToggleButton" 31 android:textOff="Start" 32 android:textOn="Stop" /> 33 </RelativeLayout> 5 android:layout_height="fill_parent" > 6 7 <TextView 8 android:id="@+id/text" 9 android:layout_width="fill_parent" 10 android:layout_height="wrap_content" 11 android:layout_alignParentLeft="true" 12 android:layout_alignParentTop="true" /> 13 14 15 16 <ToggleButton 17 android:id="@+id/status" 18 style="@style/ToggleButton" 19 android:layout_width="match_parent" 20 android:layout_height="200dp" 21 android:layout_marginLeft="20dp" 22 android:layout_marginRight="20dp" 23 android:layout_alignParentLeft="true" 24 android:layout_centerVertical="true" 25 android:onClick="onToggleClicked" 26 android:textOff="START" 27 android:textOn="STOP" /> 28 29 <Button 30 android:id="@+id/zend" 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:layout_alignParentBottom="true" 34 android:layout_alignParentLeft="true" 35 android:text="Verzenden" /> 36 37 </RelativeLayout> -
trunk/TagTracker/res/values-v11/themes.xml
r3 r4 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <resources> 3 <style name="MyTheme" parent="@android:style/Theme.Holo"> 3 <style name="ActionBar" parent="@android:style/Widget.Holo.ActionBar" /> 4 <style name="MyTheme" parent="@android:style/Theme.Holo.Light"> 4 5 <!-- Any customizations for your app running on post-3.0 devices here --> 6 <item name="android:actionBarStyle">@style/ActionBar.Light</item> 7 </style> 8 <style name="ToggleButton" parent="@android:Widget"> 9 <item name="android:background">@drawable/toggle_button</item> 10 <item name="android:textColor">#FF231f20</item> 11 <item name="android:textSize">50dp</item> 12 </style> 13 <style name="ActionBar.Light" parent="@style/ActionBar"> 14 <item name="android:background">#FF03a9e7</item> 15 <item name="android:windowActionBarOverlay">true</item> 5 16 </style> 6 17 </resources> -
trunk/TagTracker/src/nl/deadpixel/tagtracker/beta/TagTrackerActivity.java
r3 r4 24 24 import android.os.PowerManager.WakeLock; 25 25 import android.util.Log; 26 import android.view.Menu; 27 import android.view.MenuInflater; 26 28 import android.view.View; 27 29 import android.widget.Button; … … 35 37 private IntentFilter[] mFilters; 36 38 private String[][] mTechLists; 37 private TextView mText;38 private int mCount = 0;39 39 private FileHandler fh = new FileHandler(); 40 40 private boolean writeAllow = false; … … 55 55 }); 56 56 mScreen = (RelativeLayout) findViewById(R.id.Screen); 57 mText = (TextView) findViewById(R.id.text);58 mText.setText("Scan a tag");59 57 mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE,""); 60 58 mWakeLock.acquire(); … … 96 94 fh.writeEnd(DateFormat.getDateTimeInstance().format(new Date())); 97 95 writeAllow = false; 98 mText = (TextView) findViewById(R.id.text);99 mText.setText("Scan a tag");100 96 cardID.clear(); 101 97 } … … 120 116 if(!cardID.contains(uid)) 121 117 { 122 //Log.i("Foreground dispatch", "Discovered tag with ID: " + uid);118 Log.i("Foreground dispatch", "Discovered tag with ID: " + uid); 123 119 //mText.append("\r\n["+time+"] Discovered tag " + ++mCount + " with ID: " + uid); 124 120 fh.writeUID(uid, time, ""); … … 172 168 handler.postDelayed(new Runnable() { 173 169 public void run() { 174 mScreen.setBackgroundColor(android.R.color. black);170 mScreen.setBackgroundColor(android.R.color.white); 175 171 } 176 172 }, time); … … 183 179 if (mAdapter != null) mAdapter.disableForegroundDispatch(this); 184 180 } 181 @Override 182 public boolean onCreateOptionsMenu(Menu menu) { 183 MenuInflater inflater = getMenuInflater(); 184 inflater.inflate(R.menu.lo_menu, menu); 185 return true; 186 } 185 187 }
Note: See TracChangeset
for help on using the changeset viewer.