Bug 696846 - Use default system theme except on GeckoSurfaceView. r=blassey
authorWes Johnston <wjohnston@mozilla.com>
Wed, 26 Oct 2011 11:01:31 -0700
changeset 83274 73b766e13426c63b613b582a99f5ae9914d57bab
parent 83273 0668a17050a391e58f13ea90f926123b79eceaa2
child 83275 276adcd35518a12464647b02358cb8d3de026620
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs696846
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 696846 - Use default system theme except on GeckoSurfaceView. r=blassey
embedding/android/GeckoSurfaceView.java
embedding/android/Makefile.in
embedding/android/PromptService.java
embedding/android/resources/layout/dialog_checkbox.xml
embedding/android/resources/values/themes.xml
--- a/embedding/android/GeckoSurfaceView.java
+++ b/embedding/android/GeckoSurfaceView.java
@@ -69,23 +69,23 @@ import android.util.*;
  */
 class GeckoSurfaceView
     extends SurfaceView
     implements SurfaceHolder.Callback, SensorEventListener, LocationListener
 {
     private static final String LOG_FILE_NAME = "GeckoSurfaceView";
 
     public GeckoSurfaceView(Context context) {
-        super(context);
+        super(context, null, android.R.style.Theme_Light_NoTitleBar);
 
         getHolder().addCallback(this);
         inputConnection = new GeckoInputConnection(this);
         setFocusable(true);
         setFocusableInTouchMode(true);
-        
+
         DisplayMetrics metrics = new DisplayMetrics();
         GeckoApp.mAppContext.getWindowManager().
             getDefaultDisplay().getMetrics(metrics);
         mWidth = metrics.widthPixels;
         mHeight = metrics.heightPixels;
         mBufferWidth = 0;
         mBufferHeight = 0;
 
--- a/embedding/android/Makefile.in
+++ b/embedding/android/Makefile.in
@@ -144,17 +144,16 @@ RES_LAYOUT = \
   res/layout/awesomebar_header_row.xml \
   res/layout/awesomebar_row.xml \
   res/layout/awesomebar_tabs.xml \
   res/layout/browser_toolbar.xml \
   res/layout/bookmarks.xml \
   res/layout/bookmark_list_row.xml \
   res/layout/tabs_tray.xml \
   res/layout/tabs_row.xml \
-  res/layout/dialog_checkbox.xml \
   res/layout/doorhangerpopup.xml \
   $(NULL)
 
 RES_VALUES = \
   res/values/colors.xml \
   res/values/styles.xml \
   res/values/themes.xml \
   res/values/arrays.xml \
--- a/embedding/android/PromptService.java
+++ b/embedding/android/PromptService.java
@@ -42,16 +42,17 @@ import java.util.List;
 import java.util.concurrent.SynchronousQueue;
 import android.util.Log;
 import java.lang.String;
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.DialogInterface;
 import android.view.View;
 import android.view.LayoutInflater;
+import android.view.ViewGroup.LayoutParams;
 import android.widget.TextView;
 import android.widget.CheckBox;
 import android.widget.EditText;
 import android.widget.LinearLayout;
 import android.widget.Spinner;
 import android.widget.ArrayAdapter;
 import android.content.DialogInterface;
 import android.content.DialogInterface.OnClickListener;
@@ -93,19 +94,19 @@ public class PromptService implements On
                 type  = aJSONInput.getString("type");
             } catch(Exception ex) { }
             try {
                 hint  = aJSONInput.getString("hint");
             } catch(Exception ex) { }
         }
 
         public View getView() {
-            LayoutInflater inflater = GeckoApp.mAppContext.getLayoutInflater();
             if (type.equals("checkbox")) {
-                CheckBox checkbox = (CheckBox) inflater.inflate(R.layout.dialog_checkbox, null);
+                CheckBox checkbox = new CheckBox(GeckoApp.mAppContext);
+                checkbox.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
                 checkbox.setText(label);
                 try {
                     Boolean value = mJSONInput.getBoolean("checked");
                     checkbox.setChecked(value);
                 } catch(Exception ex) { }
                 view = (View)checkbox;
             } else if (type.equals("textbox") || this.type.equals("password")) {
                 EditText input = new EditText(GeckoApp.mAppContext);
deleted file mode 100644
--- a/embedding/android/resources/layout/dialog_checkbox.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
-          android:id="@+id/checkbox"
-          android:textAppearance="?android:attr/textAppearanceMediumInverse"/>
--- a/embedding/android/resources/values/themes.xml
+++ b/embedding/android/resources/values/themes.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <style name="GreyTheme" parent="@android:style/Theme.Light.NoTitleBar">
+    <style name="GreyTheme" parent="@android:style/Theme.NoTitleBar">
         <item name="android:windowBackground">@color/splash_background</item>
     </style>
 
     <style name="HoneycombTheme" parent="@android:style/Theme.Holo">
         <item name="android:windowBackground">@color/splash_background</item>
     </style>
 </resources>