Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from toranb/master

fix that went up just 2 days before the code-camp weekend
  • Loading branch information...
commit 8805aafbd2896746c7d459b0d53fad5a1d9a5a8d 2 parents c11f8c9 + 4ba0352
@ChrisMissal ChrisMissal authored
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
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.