• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++objective-ccocoa誰得c#linuxgamebathyscaphephp翻訳qtpythonrubycwindowsomegattwitterguiframeworkbtronarduinovb.netdirectxtestゲームエンジンdom計画中(planning stage)previewer

Navigation voice changer app for Android


コミットメタ情報

リビジョン1c9858002effa39e479a931d9ad56200f013e96f (tree)
日時2013-07-20 18:00:17
作者HMML <hmml3939@gmai...>
コミッターHMML

ログメッセージ

Add install list activity.

変更サマリ

差分

--- /dev/null
+++ b/.classpath
@@ -0,0 +1,9 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<classpath>
3+ <classpathentry kind="src" path="src"/>
4+ <classpathentry kind="src" path="gen"/>
5+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+ <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7+ <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
8+ <classpathentry kind="output" path="bin/classes"/>
9+</classpath>
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
1+/gen
2+/bin
3+/libs
--- /dev/null
+++ b/.project
@@ -0,0 +1,33 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<projectDescription>
3+ <name>NaviVoiceChanger</name>
4+ <comment></comment>
5+ <projects>
6+ </projects>
7+ <buildSpec>
8+ <buildCommand>
9+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+ <arguments>
11+ </arguments>
12+ </buildCommand>
13+ <buildCommand>
14+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+ <arguments>
16+ </arguments>
17+ </buildCommand>
18+ <buildCommand>
19+ <name>org.eclipse.jdt.core.javabuilder</name>
20+ <arguments>
21+ </arguments>
22+ </buildCommand>
23+ <buildCommand>
24+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+ <arguments>
26+ </arguments>
27+ </buildCommand>
28+ </buildSpec>
29+ <natures>
30+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+ <nature>org.eclipse.jdt.core.javanature</nature>
32+ </natures>
33+</projectDescription>
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
1+eclipse.preferences.version=1
2+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3+org.eclipse.jdt.core.compiler.compliance=1.6
4+org.eclipse.jdt.core.compiler.source=1.6
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -22,6 +22,14 @@
2222 <category android:name="android.intent.category.LAUNCHER" />
2323 </intent-filter>
2424 </activity>
25+ <activity
26+ android:name="jp.nekoteki.android.navivoicechanger.InstallListActivity"
27+ android:label="@string/title_activity_install_list"
28+ android:parentActivityName="jp.nekoteki.android.navivoicechanger.MainMenuActivity" >
29+ <meta-data
30+ android:name="android.support.PARENT_ACTIVITY"
31+ android:value="jp.nekoteki.android.navivoicechanger.MainMenuActivity" />
32+ </activity>
2533 </application>
2634
2735 </manifest>
--- /dev/null
+++ b/res/layout/activity_install_list.xml
@@ -0,0 +1,16 @@
1+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+ xmlns:tools="http://schemas.android.com/tools"
3+ android:layout_width="match_parent"
4+ android:layout_height="match_parent"
5+ android:paddingBottom="@dimen/activity_vertical_margin"
6+ android:paddingLeft="@dimen/activity_horizontal_margin"
7+ android:paddingRight="@dimen/activity_horizontal_margin"
8+ android:paddingTop="@dimen/activity_vertical_margin"
9+ tools:context=".InstallListActivity" >
10+
11+ <TextView
12+ android:layout_width="wrap_content"
13+ android:layout_height="wrap_content"
14+ android:text="@string/hello_world" />
15+
16+</RelativeLayout>
--- a/res/layout/activity_main_menu.xml
+++ b/res/layout/activity_main_menu.xml
@@ -11,19 +11,19 @@
1111 tools:context=".MainMenuActivity" >
1212
1313 <Button
14- android:id="@+id/button1"
14+ android:id="@+id/btn_menu_install"
1515 android:layout_width="fill_parent"
1616 android:layout_height="wrap_content"
1717 android:text="@string/menu_install" />
1818
1919 <Button
20- android:id="@+id/button2"
20+ android:id="@+id/btn_menu_download"
2121 android:layout_width="fill_parent"
2222 android:layout_height="wrap_content"
2323 android:text="@string/menu_download" />
2424
2525 <Button
26- android:id="@+id/button3"
26+ android:id="@+id/btn_menu_maint"
2727 android:layout_width="fill_parent"
2828 android:layout_height="wrap_content"
2929 android:text="@string/menu_maint" />
--- /dev/null
+++ b/res/menu/install_list.xml
@@ -0,0 +1,9 @@
1+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
2+
3+ <item
4+ android:id="@+id/action_settings"
5+ android:orderInCategory="100"
6+ android:showAsAction="never"
7+ android:title="@string/action_settings"/>
8+
9+</menu>
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7,5 +7,6 @@
77 <string name="menu_install">Install Voice Data</string>
88 <string name="menu_download">Downlod Voice Data</string>
99 <string name="menu_maint">Maintenance</string>
10+ <string name="title_activity_install_list">InstallListActivity</string>
1011
1112 </resources>
--- /dev/null
+++ b/src/jp/nekoteki/android/navivoicechanger/InstallListActivity.java
@@ -0,0 +1,56 @@
1+package jp.nekoteki.android.navivoicechanger;
2+
3+import android.os.Bundle;
4+import android.app.Activity;
5+import android.view.Menu;
6+import android.view.MenuItem;
7+import android.support.v4.app.NavUtils;
8+import android.annotation.TargetApi;
9+import android.os.Build;
10+
11+
12+public class InstallListActivity extends Activity {
13+
14+ @Override
15+ protected void onCreate(Bundle savedInstanceState) {
16+ super.onCreate(savedInstanceState);
17+ setContentView(R.layout.activity_install_list);
18+ // Show the Up button in the action bar.
19+ setupActionBar();
20+ }
21+
22+ /**
23+ * Set up the {@link android.app.ActionBar}, if the API is available.
24+ */
25+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
26+ private void setupActionBar() {
27+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
28+ getActionBar().setDisplayHomeAsUpEnabled(true);
29+ }
30+ }
31+
32+ @Override
33+ public boolean onCreateOptionsMenu(Menu menu) {
34+ // Inflate the menu; this adds items to the action bar if it is present.
35+ getMenuInflater().inflate(R.menu.install_list, menu);
36+ return true;
37+ }
38+
39+ @Override
40+ public boolean onOptionsItemSelected(MenuItem item) {
41+ switch (item.getItemId()) {
42+ case android.R.id.home:
43+ // This ID represents the Home or Up button. In the case of this
44+ // activity, the Up button is shown. Use NavUtils to allow users
45+ // to navigate up one level in the application structure. For
46+ // more details, see the Navigation pattern on Android Design:
47+ //
48+ // http://developer.android.com/design/patterns/navigation.html#up-vs-back
49+ //
50+ NavUtils.navigateUpFromSameTask(this);
51+ return true;
52+ }
53+ return super.onOptionsItemSelected(item);
54+ }
55+
56+}
--- a/src/jp/nekoteki/android/navivoicechanger/MainMenuActivity.java
+++ b/src/jp/nekoteki/android/navivoicechanger/MainMenuActivity.java
@@ -2,7 +2,9 @@ package jp.nekoteki.android.navivoicechanger;
22
33 import android.os.Bundle;
44 import android.app.Activity;
5+import android.content.Intent;
56 import android.view.Menu;
7+import android.view.View;
68
79 public class MainMenuActivity extends Activity {
810
@@ -10,6 +12,19 @@ public class MainMenuActivity extends Activity {
1012 protected void onCreate(Bundle savedInstanceState) {
1113 super.onCreate(savedInstanceState);
1214 setContentView(R.layout.activity_main_menu);
15+
16+
17+ View.OnClickListener click_hdl_install = new View.OnClickListener() {
18+
19+ @Override
20+ public void onClick(View v) {
21+ Intent intent = new Intent(MainMenuActivity.this, InstallListActivity.class);
22+ startActivity(intent);
23+ }
24+ };
25+
26+ View btn_install = findViewById(R.id.btn_menu_install);
27+ btn_install.setOnClickListener(click_hdl_install);
1328 }
1429
1530 @Override
@@ -18,5 +33,7 @@ public class MainMenuActivity extends Activity {
1833 getMenuInflater().inflate(R.menu.main_menu, menu);
1934 return true;
2035 }
36+
37+
2138
2239 }