Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add ActionBarSherlock for pre-ics support

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