Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add ActionBarSherlock for pre-ics support

  • Loading branch information...
commit 32147b6391fe94aa4383b995fcafebdf787ec81f 1 parent 665378e
Jonas Bengtsson authored
3  .gitmodules
... ... @@ -0,0 +1,3 @@
  1 +[submodule "vendor/ActionBarSherlock"]
  2 + path = vendor/ActionBarSherlock
  3 + url = git://github.com/JakeWharton/ActionBarSherlock.git
2  AndroidManifest.xml
@@ -5,7 +5,7 @@
5 5 android:versionName="1.0">
6 6 <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="15"/>
7 7 <uses-permission android:name="android.permission.INTERNET"/>
8   - <application android:label="@string/app_name" android:theme="@style/Main">
  8 + <application android:label="@string/app_name" android:theme="@style/Theme.Sherlock">
9 9 <activity android:name="MainActivity"
10 10 android:label="@string/app_name"
11 11 android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
1  AutomatonBrain.iml
@@ -36,6 +36,7 @@
36 36 </content>
37 37 <orderEntry type="jdk" jdkName="Android 4.0.3 Platform" jdkType="Android SDK" />
38 38 <orderEntry type="sourceFolder" forTests="false" />
  39 + <orderEntry type="module" module-name="ActionBarSherlock" />
39 40 </component>
40 41 </module>
41 42
1  project.properties
@@ -9,3 +9,4 @@
9 9
10 10 # Project target.
11 11 target=android-15
  12 +android.library.reference.1=vendor/ActionBarSherlock/library
4 res/values-v11/styles.xml
... ... @@ -1,4 +0,0 @@
1   -<resources>
2   - <style name="Main" parent="android:Theme.Holo">
3   - </style>
4   -</resources>
4 res/values/styles.xml
... ... @@ -1,4 +0,0 @@
1   -<resources>
2   - <style name="Main" parent="android:Theme.NoTitleBar">
3   - </style>
4   -</resources>
14 src/se/forskningsavd/MainActivity.java
... ... @@ -1,17 +1,19 @@
1 1 package se.forskningsavd;
2 2
3   -import android.app.Activity;
4 3 import android.app.AlertDialog;
5 4 import android.content.DialogInterface;
6 5 import android.graphics.Bitmap;
7 6 import android.os.Bundle;
8   -import android.view.*;
  7 +import android.view.KeyEvent;
  8 +import android.view.View;
  9 +import android.view.WindowManager;
9 10 import android.view.inputmethod.EditorInfo;
10 11 import android.widget.*;
  12 +import com.actionbarsherlock.app.SherlockActivity;
11 13
12 14 import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
13 15
14   -public class MainActivity extends Activity {
  16 +public class MainActivity extends SherlockActivity {
15 17 private Communicator mCommunicator;
16 18 private String mLastMessage;
17 19
@@ -55,14 +57,14 @@ public void onClick(View view) {
55 57 }
56 58
57 59 @Override
58   - public boolean onCreateOptionsMenu(Menu menu) {
59   - final MenuInflater inflater = getMenuInflater();
  60 + public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {
  61 + final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
60 62 inflater.inflate(R.menu.main_activity, menu);
61 63 return true;
62 64 }
63 65
64 66 @Override
65   - public boolean onOptionsItemSelected(MenuItem item) {
  67 + public boolean onOptionsItemSelected(com.actionbarsherlock.view.MenuItem item) {
66 68 switch (item.getItemId()) {
67 69 case R.id.menu_light:
68 70 mCommunicator.sendText("/light");
1  vendor/ActionBarSherlock
... ... @@ -0,0 +1 @@
  1 +Subproject commit 8fcee10a340d54fb4acdbddcdc1746ad3f377eca

0 comments on commit 32147b6

Please sign in to comment.
Something went wrong with that request. Please try again.