Commits

littledot5566  committed 5669093

*Tweaked UI.

  • Participants
  • Parent commits 2a8084d

Comments (0)

Files changed (12)

File AndroidManifest.xml

     <application
         android:icon="@drawable/treasure_chest_512"
         android:label="Local Treasure"
-        android:theme="@style/Holo.Theme.Sherlock" >
+        android:theme="@style/Holo.Theme.Sherlock.MediumText" >
 
         <!--  -->
         <uses-library android:name="com.google.android.maps" />

File res/layout/credits_act.xml

     android:layout_height="fill_parent"
     android:orientation="vertical" >
 
+    <TextView
+        android:id="@+id/credits_tv_thx"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_horizontal"
+        android:text="@string/credits" />
+
+    <TextView
+        android:id="@+id/credits_tv_issues"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_horizontal"
+        android:text="@string/report_issues" />
+
 </LinearLayout>

File res/layout/history_act_layout.xml

         android:id="@+id/history_tv_empty"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:text="No expeditions yet."
+        android:text="The winds brush softly across my cheek...\nIt is a fine day for an adventure!"
         android:visibility="gone" />
 
     <ListView

File res/layout/main_act_layout.xml

         android:layout_height="48dp"
         android:onClick="onClick"
         android:text="Treasure Chest" />
-
    <Button
+
+    <Button
+        android:id="@+id/main_but_settings"
+        android:layout_width="fill_parent"
+        android:layout_height="48dp"
+        android:onClick="onClick"
+        android:text="Settings"
+        android:visibility="gone" />
+
+    <Button
         android:id="@+id/main_but_credits"
         android:layout_width="fill_parent"
         android:layout_height="48dp"

File res/layout/splash_act_layout.xml

     android:layout_width="fill_parent"
     android:layout_height="fill_parent" >
 
+    <ImageView
+        android:id="@+id/splash_iv_icon"
+        android:layout_width="128dp"
+        android:layout_height="128dp"
+        android:layout_centerInParent="true"
+        android:src="@drawable/treasure_chest_512" />
+
     <TextView
-        android:id="@+id/splash_tv_appName"
+        android:id="@+id/splash_tv_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_centerInParent="true"
-        android:drawableTop="@drawable/treasure_chest_512"
-        android:text="@string/app_name" />
+        android:layout_below="@id/splash_iv_icon"
+        android:layout_centerHorizontal="true"
+        android:text="Local Treasure" />
 
 </RelativeLayout>

File res/values/strings.xml

 <resources>
 
-    <string name="app_name">TreasureHunter</string>
+    <string name="app_name">Local Treasure</string>
     <string name="menu_settings">Settings</string>
     <string name="title_activity_main">Local Treasure</string>
     <string name="geolock_tv_title">Discovering your current location</string>
     <string name="distance_but_500m">500m</string>
     <string name="distance_et_custom">Enter custom distance (m)</string>
     <string name="distance_but_custom">Custom</string>
+    <!-- CreditsActivity -->
+    <string name="credits">Created by Littledot.\n
+        Thanks to <a href="http://mohsenfakharian.deviantart.com/gallery">Mohsen Fakharian</a> for logo.\n
+        Thanks to <a href="http://www.icons-land.com/">Icons-Land</a> for icons.</string>
+    <string name="report_issues">If you uncover a bug or have suggestions for enhancement, please <a href="https://bitbucket.org/littledot5566/localtreasure/issues?status=new&amp;status=open">let me know!</a></string>
 
 </resources>

File res/values/styles.xml

-<resources>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
 
     <style name="AppTheme" parent="android:Theme.Light.NoTitleBar" />
 
+    <style name="Holo.TextView.MediumText" parent="Holo.TextView">
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+    </style>
+
+    <style name="Holo.Theme.Sherlock.MediumText" parent="Holo.Theme.Sherlock">
+        <item name="android:textViewStyle">@style/Holo.TextView.MediumText</item>
+    </style>
+
 </resources>

File src/nctuw/littledot/localtreasure/components/CreditsActivity.java

 import org.holoeverywhere.app.Activity;
 
 import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.view.MenuItem;
 
 import android.os.Bundle;
+import android.text.method.LinkMovementMethod;
+import android.widget.TextView;
 
 public class CreditsActivity extends Activity {
 
+	private TextView tvThx;
+	private TextView tvIssues;
+
 	@Override
 	protected void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 
 		setContentView(R.layout.credits_act);
+		tvThx = (TextView) findViewById(R.id.credits_tv_thx);
+		tvIssues = (TextView) findViewById(R.id.credits_tv_issues);
+		tvThx.setMovementMethod(LinkMovementMethod.getInstance());
+		tvIssues.setMovementMethod(LinkMovementMethod.getInstance());
 
 		ActionBar ab = getSupportActionBar();
 		ab.setDisplayHomeAsUpEnabled(true);
 		ab.setTitle("Credits");
 
 	}
+
+	@Override
+	public boolean onOptionsItemSelected(MenuItem item) {
+		int id = item.getItemId();
+
+		if (id == android.R.id.home) {
+			finish();
+			return true;
+		}
+		return super.onOptionsItemSelected(item);
+	}
 }

File src/nctuw/littledot/localtreasure/components/ExpeditionActivity.java

 		}
 	}
 
+	private static int MENU_GIVEUP = 1;
+
+	@Override
+	public boolean onCreateOptionsMenu(Menu menu) {
+
+		menu.add(Menu.NONE, MENU_GIVEUP, Menu.NONE, "Edit")
+				.setIcon(android.R.drawable.ic_menu_myplaces)
+				.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_ALWAYS);
+
+		return super.onCreateOptionsMenu(menu);
+	}
+
 	@Override
 	public boolean onOptionsItemSelected(MenuItem item) {
 		int id = item.getItemId();
 		if (id == android.R.id.home) {
 			finish();
 			return true;
+		} else if (id == MENU_GIVEUP) {
 		}
 		return super.onOptionsItemSelected(item);
 	}

File src/nctuw/littledot/localtreasure/components/MainActivity.java

 			intent.putExtra(Const.BUNDLE_SOURCE, getClass().getName());
 			startActivity(intent);
 
+		} else if (id == R.id.main_but_settings) {
+			Intent intent = new Intent(this, SettingsActivity.class);
+			intent.putExtra(Const.BUNDLE_SOURCE, getClass().getName());
+			startActivity(intent);
+
 		} else if (id == R.id.main_but_credits) {
 			Intent intent = new Intent(this, CreditsActivity.class);
 			intent.putExtra(Const.BUNDLE_SOURCE, getClass().getName());

File src/nctuw/littledot/localtreasure/components/SettingsActivity.java

+package nctuw.littledot.localtreasure.components;
+
+import org.holoeverywhere.preference.PreferenceActivity;
+
+import android.os.Bundle;
+
+public class SettingsActivity extends PreferenceActivity {
+
+	@Override
+	protected void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+	}
+}

File src/nctuw/littledot/localtreasure/components/SplashActivity.java

 package nctuw.littledot.localtreasure.components;
 
 import nctuw.littledot.localtreasure.R;
+
+import org.holoeverywhere.app.Activity;
+
 import android.content.Intent;
 import android.os.Bundle;
 import android.widget.TextView;
 
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockActivity;
-
-public class SplashActivity extends SherlockActivity {
-	public static int SPLASH_PAUSE = 0;
+public class SplashActivity extends Activity {
+	public static int SPLASH_PAUSE = 1000;
 
 	@Override
 	protected void onCreate(Bundle savedInstanceState) {
+		setTheme(R.style.Theme_Sherlock_NoActionBar);
 		super.onCreate(savedInstanceState);
+
 		setContentView(R.layout.splash_act_layout);
+		TextView logo = (TextView) findViewById(R.id.splash_tv_name);
 
-		TextView logo = (TextView) findViewById(R.id.splash_tv_appName);
 		logo.postDelayed(new Runnable() {
-
 			public void run() {
-
 				Intent mainActivity = new Intent(SplashActivity.this,
 						MainActivity.class);
 				startActivity(mainActivity);
 			}
 		}, SPLASH_PAUSE);
 
-		ActionBar ab = getSupportActionBar();
-		ab.hide();
 	}
 }