Skip to content
Browse files

Merge pull request #2 from toranb/master

fix that went up just 2 days before the code-camp weekend
  • Loading branch information...
2 parents c11f8c9 + 4ba0352 commit 8805aafbd2896746c7d459b0d53fad5a1d9a5a8d @ChrisMissal ChrisMissal committed Nov 12, 2011
Showing with 12 additions and 7 deletions.
  1. +1 −1 AndroidManifest.xml
  2. +11 −6 src/main/java/com/iowacodecamp/android/global/NavigationAndTitleHelper.java
View
2 AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.iowacodecamp.android" android:versionCode="1" android:versionName="1.0">
+ package="com.iowacodecamp.android" android:versionCode="2" android:versionName="1.1">
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.INTERNET"/>
View
17 src/main/java/com/iowacodecamp/android/global/NavigationAndTitleHelper.java
@@ -18,11 +18,16 @@ public NavigationAndTitleHelper(Activity activity) {
public void setNavigationAndTitle() {
ViewGroup decorView = (ViewGroup) this.activity.getWindow().getDecorView();
LinearLayout root = (LinearLayout) decorView.getChildAt(0);
- FrameLayout titleContainer = (FrameLayout) root.getChildAt(0);
- TextView title = (TextView) titleContainer.getChildAt(0);
- title.setTextSize(20);
- title.setGravity(Gravity.CENTER);
- titleContainer.setBackgroundColor(Color.parseColor("#FF9000"));
- title.setBackgroundColor(Color.parseColor("#FF9000"));
+
+ try {
+ FrameLayout titleContainer = (FrameLayout) root.getChildAt(0);
+ TextView title = (TextView) titleContainer.getChildAt(0);
+ title.setTextSize(20);
+ title.setGravity(Gravity.CENTER);
+ titleContainer.setBackgroundColor(Color.parseColor("#FF9000"));
+ title.setBackgroundColor(Color.parseColor("#FF9000"));
+ } catch (Exception ex) {
+ //for now it seems tablets blow up here ... need to play with one to figure out why
+ }
}
}

0 comments on commit 8805aaf

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