添加一个Link

--- a/alps/packages/apps/Link/res/values/strings.xml
+++ b/alps/packages/apps/Link/res/values/strings.xml
@@ -14,5 +14,5 @@
     <string name="default8_twitter">twitter</string>    
     <string name="default9_yahoo">yahoo</string>   
     <string name="default10_icherry">i-Cherry</string>
-    
+    <string name="operaMini">Opera Mini</string>
 </resources>
\ No newline at end of file


--- a/alps/packages/apps/Link/AndroidManifest.xml
+++ b/alps/packages/apps/Link/AndroidManifest.xml
@@ -122,7 +122,17 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        
+        <activity
+            android:name=".OperaMiniActivity"
+            android:label="@string/operaMini"
+            android:theme="@android:style/Theme.NoDisplay"
+            android:icon="@drawable/operamini" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
     </application>
 
 </manifest>

--- /dev/null
+++ b/alps/packages/apps/Link/src/com/XXX/link/OperaMiniActivity.java
@@ -0,0 +1,26 @@
+package com.leader.link;
+
+import android.net.Uri;
+import android.os.Bundle;
+import android.app.Activity;
+import android.content.Intent;
+import android.view.Menu;
+
+public class OperaMiniActivity extends Activity {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+        Intent mIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://m.operamini.com"));
+        try {
+            startActivity(mIntent);            
+		} catch (android.content.ActivityNotFoundException e) {
+			// TODO: handle exception
+		}finally{
+			this.finish();
+		}
+
+    }
+
+}

packages/apps/Link/res/drawable-hdpi/operamini.png


你可能感兴趣的:(添加一个Link)