Revision 16364074
.classpath | ||
---|---|---|
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> |
.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>ChecKey</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> |
AndroidManifest.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
|
3 |
package="info.guardianproject.checkey" |
|
4 |
android:versionCode="1" |
|
5 |
android:versionName="1.0" > |
|
6 |
|
|
7 |
<uses-sdk |
|
8 |
android:minSdkVersion="7" |
|
9 |
android:targetSdkVersion="19" /> |
|
10 |
|
|
11 |
<application |
|
12 |
android:allowBackup="true" |
|
13 |
android:icon="@drawable/ic_launcher" |
|
14 |
android:label="@string/app_name" |
|
15 |
android:theme="@style/AppTheme" > |
|
16 |
<activity |
|
17 |
android:name="info.guardianproject.checkey.MainActivity" |
|
18 |
android:label="@string/app_name" > |
|
19 |
<intent-filter> |
|
20 |
<action android:name="android.intent.action.MAIN" /> |
|
21 |
|
|
22 |
<category android:name="android.intent.category.LAUNCHER" /> |
|
23 |
</intent-filter> |
|
24 |
</activity> |
|
25 |
</application> |
|
26 |
|
|
27 |
</manifest> |
project.properties | ||
---|---|---|
1 |
# This file is automatically generated by Android Tools. |
|
2 |
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! |
|
3 |
# |
|
4 |
# This file must be checked in Version Control Systems. |
|
5 |
# |
|
6 |
# To customize properties used by the Ant build system edit |
|
7 |
# "ant.properties", and override values to adapt the script to your |
|
8 |
# project structure. |
|
9 |
# |
|
10 |
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): |
|
11 |
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt |
|
12 |
|
|
13 |
# Project target. |
|
14 |
target=android-19 |
|
15 |
android.library.reference.1=../../../../../home/hans/workspace/trusted-intents/appcompat_v7 |
res/layout/activity_main.xml | ||
---|---|---|
1 |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
2 |
xmlns:tools="http://schemas.android.com/tools" |
|
3 |
android:id="@+id/container" |
|
4 |
android:layout_width="match_parent" |
|
5 |
android:layout_height="match_parent" |
|
6 |
tools:context="info.guardianproject.checkey.MainActivity" |
|
7 |
tools:ignore="MergeRootFrame" /> |
res/layout/fragment_main.xml | ||
---|---|---|
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="info.guardianproject.checkey.MainActivity$PlaceholderFragment" > |
|
10 |
|
|
11 |
<TextView |
|
12 |
android:layout_width="wrap_content" |
|
13 |
android:layout_height="wrap_content" |
|
14 |
android:text="@string/hello_world" /> |
|
15 |
|
|
16 |
</RelativeLayout> |
res/menu/main.xml | ||
---|---|---|
1 |
<menu xmlns:android="http://schemas.android.com/apk/res/android" |
|
2 |
xmlns:app="http://schemas.android.com/apk/res-auto" |
|
3 |
xmlns:tools="http://schemas.android.com/tools" |
|
4 |
tools:context="info.guardianproject.checkey.MainActivity" > |
|
5 |
|
|
6 |
<item |
|
7 |
android:id="@+id/action_settings" |
|
8 |
android:orderInCategory="100" |
|
9 |
android:title="@string/action_settings" |
|
10 |
app:showAsAction="never"/> |
|
11 |
|
|
12 |
</menu> |
res/values-v11/styles.xml | ||
---|---|---|
1 |
<resources> |
|
2 |
|
|
3 |
<!-- |
|
4 |
Base application theme for API 11+. This theme completely replaces |
|
5 |
AppBaseTheme from res/values/styles.xml on API 11+ devices. |
|
6 |
--> |
|
7 |
<style name="AppBaseTheme" parent="Theme.AppCompat.Light"> |
|
8 |
<!-- API 11 theme customizations can go here. --> |
|
9 |
</style> |
|
10 |
|
|
11 |
</resources> |
res/values-v14/styles.xml | ||
---|---|---|
1 |
<resources> |
|
2 |
|
|
3 |
<!-- |
|
4 |
Base application theme for API 14+. This theme completely replaces |
|
5 |
AppBaseTheme from BOTH res/values/styles.xml and |
|
6 |
res/values-v11/styles.xml on API 14+ devices. |
|
7 |
--> |
|
8 |
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar"> |
|
9 |
<!-- API 14 theme customizations can go here. --> |
|
10 |
</style> |
|
11 |
|
|
12 |
</resources> |
res/values-w820dp/dimens.xml | ||
---|---|---|
1 |
<resources> |
|
2 |
|
|
3 |
<!-- |
|
4 |
Example customization of dimensions originally defined in res/values/dimens.xml |
|
5 |
(such as screen margins) for screens with more than 820dp of available width. This |
|
6 |
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). |
|
7 |
--> |
|
8 |
<dimen name="activity_horizontal_margin">64dp</dimen> |
|
9 |
|
|
10 |
</resources> |
res/values/dimens.xml | ||
---|---|---|
1 |
<resources> |
|
2 |
|
|
3 |
<!-- Default screen margins, per the Android Design guidelines. --> |
|
4 |
<dimen name="activity_horizontal_margin">16dp</dimen> |
|
5 |
<dimen name="activity_vertical_margin">16dp</dimen> |
|
6 |
|
|
7 |
</resources> |
res/values/strings.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<resources> |
|
3 |
|
|
4 |
<string name="app_name">ChecKey</string> |
|
5 |
<string name="hello_world">Hello world!</string> |
|
6 |
<string name="action_settings">Settings</string> |
|
7 |
|
|
8 |
</resources> |
res/values/styles.xml | ||
---|---|---|
1 |
<resources> |
|
2 |
|
|
3 |
<!-- |
|
4 |
Base application theme, dependent on API level. This theme is replaced |
|
5 |
by AppBaseTheme from res/values-vXX/styles.xml on newer devices. |
|
6 |
--> |
|
7 |
<style name="AppBaseTheme" parent="Theme.AppCompat.Light"> |
|
8 |
<!-- |
|
9 |
Theme customizations available in newer API levels can go in |
|
10 |
res/values-vXX/styles.xml, while customizations related to |
|
11 |
backward-compatibility can go here. |
|
12 |
--> |
|
13 |
</style> |
|
14 |
|
|
15 |
<!-- Application theme. --> |
|
16 |
<style name="AppTheme" parent="AppBaseTheme"> |
|
17 |
<!-- All customizations that are NOT specific to a particular API-level can go here. --> |
|
18 |
</style> |
|
19 |
|
|
20 |
</resources> |
src/info/guardianproject/checkey/MainActivity.java | ||
---|---|---|
1 |
|
|
2 |
package info.guardianproject.checkey; |
|
3 |
|
|
4 |
import android.support.v7.app.ActionBarActivity; |
|
5 |
import android.support.v7.app.ActionBar; |
|
6 |
import android.support.v4.app.Fragment; |
|
7 |
import android.os.Bundle; |
|
8 |
import android.view.LayoutInflater; |
|
9 |
import android.view.Menu; |
|
10 |
import android.view.MenuItem; |
|
11 |
import android.view.View; |
|
12 |
import android.view.ViewGroup; |
|
13 |
import android.os.Build; |
|
14 |
|
|
15 |
public class MainActivity extends ActionBarActivity { |
|
16 |
|
|
17 |
@Override |
|
18 |
protected void onCreate(Bundle savedInstanceState) { |
|
19 |
super.onCreate(savedInstanceState); |
|
20 |
setContentView(R.layout.activity_main); |
|
21 |
|
|
22 |
if (savedInstanceState == null) { |
|
23 |
getSupportFragmentManager().beginTransaction() |
|
24 |
.add(R.id.container, new PlaceholderFragment()) |
|
25 |
.commit(); |
|
26 |
} |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
public boolean onCreateOptionsMenu(Menu menu) { |
|
31 |
|
|
32 |
// Inflate the menu; this adds items to the action bar if it is present. |
|
33 |
getMenuInflater().inflate(R.menu.main, menu); |
|
34 |
return true; |
|
35 |
} |
|
36 |
|
|
37 |
@Override |
|
38 |
public boolean onOptionsItemSelected(MenuItem item) { |
|
39 |
// Handle action bar item clicks here. The action bar will |
|
40 |
// automatically handle clicks on the Home/Up button, so long |
|
41 |
// as you specify a parent activity in AndroidManifest.xml. |
|
42 |
int id = item.getItemId(); |
|
43 |
if (id == R.id.action_settings) { |
|
44 |
return true; |
|
45 |
} |
|
46 |
return super.onOptionsItemSelected(item); |
|
47 |
} |
|
48 |
|
|
49 |
/** |
|
50 |
* A placeholder fragment containing a simple view. |
|
51 |
*/ |
|
52 |
public static class PlaceholderFragment extends Fragment { |
|
53 |
|
|
54 |
public PlaceholderFragment() { |
|
55 |
} |
|
56 |
|
|
57 |
@Override |
|
58 |
public View onCreateView(LayoutInflater inflater, ViewGroup container, |
|
59 |
Bundle savedInstanceState) { |
|
60 |
View rootView = inflater.inflate(R.layout.fragment_main, container, false); |
|
61 |
return rootView; |
|
62 |
} |
|
63 |
} |
|
64 |
|
|
65 |
} |
Also available in: Unified diff