Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java

Issue 29439588: Issue 5244 - Misaligned text in Korean (Closed)
Patch Set: Created May 16, 2017, 11:56 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java
===================================================================
--- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java
@@ -17,35 +17,37 @@
package org.adblockplus.sbrowser.contentblocker;
import org.adblockplus.sbrowser.contentblocker.engine.Engine;
import org.adblockplus.sbrowser.contentblocker.engine.EngineService;
import org.adblockplus.adblockplussbrowser.R;
import android.app.AlertDialog;
-import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.text.Html;
import android.util.Log;
+import android.view.Gravity;
+import android.widget.Button;
+import android.widget.LinearLayout;
public class MainPreferences extends PreferenceActivity implements
EngineService.OnEngineCreatedCallback, SharedPreferences.OnSharedPreferenceChangeListener
{
private static final String TAG = MainPreferences.class.getSimpleName();
private Engine engine = null;
- private Dialog dialog;
+ private AlertDialog dialog;
private int dialogTitleResId;
private SharedPreferences getSharedPreferences()
{
return PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
}
@Override
@@ -192,16 +194,22 @@
@Override
public void onClick(DialogInterface dialog, int which)
{
Engine.openSBrowserSettings(MainPreferences.this);
}
})
.create();
this.dialog.show();
+
+ final Button btNeutral = this.dialog.getButton(AlertDialog.BUTTON_NEUTRAL);
+ final LinearLayout.LayoutParams btNeutralLayoutParams = (LinearLayout.LayoutParams) btNeutral.getLayoutParams();
+ btNeutralLayoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
+ btNeutralLayoutParams.gravity = Gravity.CENTER;
+ btNeutral.setLayoutParams(btNeutralLayoutParams);
}
}
@Override
public void onEngineCreated(Engine engine, boolean success)
{
Log.d(TAG, "onEngineCreated: " + success);
this.engine = success ? engine : null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld