Browse Source

Initial commit for PermissionLaunchTheMissiles project.

Cristian Tanas 11 years ago
parent
commit
6f266adea4

+ 37 - 0
PermissionLauchTheMissiles/AndroidManifest.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="org.uab.android.permission.lauchthemissiles"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="14"
+        android:targetSdkVersion="19" />
+    
+    <permission 
+        android:name="org.uab.android.permission.lauchthemissiles.LAUNCH_PERMISSION"
+        android:protectionLevel="dangerous"/>
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name"
+            android:permission="org.uab.android.permission.lauchthemissiles.LAUNCH_PERMISSION" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+            
+            <intent-filter>
+                <action android:name="org.uab.android.permission.lauchthemissiles.LAUNCH"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>

BIN
PermissionLauchTheMissiles/ic_launcher-web.png


BIN
PermissionLauchTheMissiles/libs/android-support-v4.jar


BIN
PermissionLauchTheMissiles/res/drawable-hdpi/ic_launcher.png


BIN
PermissionLauchTheMissiles/res/drawable-hdpi/rocket_missile.png


BIN
PermissionLauchTheMissiles/res/drawable-mdpi/ic_launcher.png


BIN
PermissionLauchTheMissiles/res/drawable-xhdpi/ic_launcher.png


BIN
PermissionLauchTheMissiles/res/drawable-xxhdpi/ic_launcher.png


+ 25 - 0
PermissionLauchTheMissiles/res/layout/activity_main.xml

@@ -0,0 +1,25 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="${relativePackage}.${activityClass}" >
+
+    <TextView
+        android:id="@+id/textView1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:text="@string/missiles_launched" />
+
+    <ImageView
+        android:id="@+id/imageView1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_above="@+id/textView1"
+        android:layout_centerHorizontal="true"
+        android:layout_marginBottom="14dp"
+        android:src="@drawable/rocket_missile"
+        android:contentDescription="@string/missiles_launched" />
+
+</RelativeLayout>

+ 11 - 0
PermissionLauchTheMissiles/res/values-v11/styles.xml

@@ -0,0 +1,11 @@
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>

+ 12 - 0
PermissionLauchTheMissiles/res/values-v14/styles.xml

@@ -0,0 +1,12 @@
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>

+ 8 - 0
PermissionLauchTheMissiles/res/values/strings.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="app_name">PermissionLauchTheMissiles</string>
+    <string name="hello_world">Hello world!</string>
+    <string name="missiles_launched">Missiles have been launched!</string>
+
+</resources>

+ 20 - 0
PermissionLauchTheMissiles/res/values/styles.xml

@@ -0,0 +1,20 @@
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>

+ 13 - 0
PermissionLauchTheMissiles/src/org/uab/android/permission/lauchthemissiles/MainActivity.java

@@ -0,0 +1,13 @@
+package org.uab.android.permission.lauchthemissiles;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class MainActivity extends Activity {
+
+	@Override
+	protected void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+		setContentView(R.layout.activity_main);
+	}
+}