Przeglądaj źródła

Add locale-not-found activity

master
Chris Smith 14 lat temu
rodzic
commit
cd58908ef0

+ 4
- 2
code/LocalePlugin/AndroidManifest.xml Wyświetl plik

@@ -1,8 +1,10 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3
      package="uk.co.md87.android.contextanalyser.locale">
4
-    <application>
5
-         <activity android:name=".MainActivity" android:label="MainActivity">
4
+    <application android:name="@string/app_name">
5
+        <activity android:name="com.twofortyfouram.MarketActivity"
6
+            android:label="Activity Plugin" android:icon="@drawable/icon"
7
+            android:theme="@android:style/Theme.Translucent.NoTitleBar">
6 8
             <intent-filter>
7 9
                 <action android:name="android.intent.action.MAIN"/>
8 10
                 <category android:name="android.intent.category.LAUNCHER"/>

BIN
code/LocalePlugin/dist/LocalePlugin.apk Wyświetl plik


BIN
code/LocalePlugin/res/drawable/icon.png Wyświetl plik


+ 1
- 1
code/LocalePlugin/res/values/strings.xml Wyświetl plik

@@ -1,4 +1,4 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <resources>
3
-    <string name="app_name">LocalePlugin</string>
3
+    <string name="app_name">Locale Plugin</string>
4 4
 </resources>

+ 10
- 0
code/LocalePlugin/res/values/strings_plugin.xml Wyświetl plik

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<resources>
3
+<!-- NOTE: these names cannot be changed without also changing the string constants in com.twofortyfouram.MarketActivity.  You will NOT get a compile time error -->
4
+
5
+    <string name="plugin_dialog_title"><i>Locale</i> Required</string>
6
+    <string name="plugin_dialog_install">Install</string>
7
+    <string name="plugin_dialog_need_locale_message"><i>Locale</i> is required to use this plug-in.  Would you like to install <i>Locale</i>?</string>
8
+    <string name="plugin_dialog_need_locale_informative">Tap \"Install\" to find <i>Locale</i> on the Android Market.</string> <!-- "Install" should match up with the plugin_dialog_install string -->
9
+    <string name="plugin_dialog_market_not_available">Application is not installed on your phone.</string>
10
+</resources>

+ 0
- 41
code/LocalePlugin/src/uk/co/md87/android/contextanalyser/locale/MainActivity.java Wyświetl plik

@@ -1,41 +0,0 @@
1
-/*
2
- * Copyright (c) 2009-2010 Chris Smith
3
- *
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- *
11
- * The above copyright notice and this permission notice shall be included in
12
- * all copies or substantial portions of the Software.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- * SOFTWARE.
21
- */
22
-
23
-package uk.co.md87.android.contextanalyser.locale;
24
-
25
-import android.app.Activity;
26
-import android.os.Bundle;
27
-
28
-/**
29
- *
30
- * @author chris
31
- */
32
-public class MainActivity extends Activity {
33
-
34
-    /** Called when the activity is first created. */
35
-    @Override
36
-    public void onCreate(Bundle icicle) {
37
-        super.onCreate(icicle);
38
-        // ToDo add your GUI initialization code here        
39
-    }
40
-
41
-}

+ 14
- 2
code/LocalePlugin/src/uk/co/md87/android/contextanalyser/locale/R.java Wyświetl plik

@@ -10,10 +10,22 @@ package uk.co.md87.android.contextanalyser.locale;
10 10
 public final class R {
11 11
     public static final class attr {
12 12
     }
13
+    public static final class drawable {
14
+        public static final int icon=0x7f020000;
15
+    }
13 16
     public static final class layout {
14
-        public static final int main=0x7f020000;
17
+        public static final int main=0x7f030000;
15 18
     }
16 19
     public static final class string {
17
-        public static final int app_name=0x7f030000;
20
+        public static final int app_name=0x7f040000;
21
+        public static final int plugin_dialog_install=0x7f040002;
22
+        /**  "Install" should match up with the plugin_dialog_install string 
23
+         */
24
+        public static final int plugin_dialog_market_not_available=0x7f040005;
25
+        public static final int plugin_dialog_need_locale_informative=0x7f040004;
26
+        public static final int plugin_dialog_need_locale_message=0x7f040003;
27
+        /**  NOTE: these names cannot be changed without also changing the string constants in com.twofortyfouram.MarketActivity.  You will NOT get a compile time error 
28
+         */
29
+        public static final int plugin_dialog_title=0x7f040001;
18 30
     }
19 31
 }

Ładowanie…
Anuluj
Zapisz