Bug 715925 - Indent options in opt groups. r=sriram
This commit is contained in:
@@ -42,6 +42,14 @@ import java.lang.String;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.text.InputType;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -56,8 +64,6 @@ import android.widget.LinearLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
import android.text.InputType;
|
||||
@@ -68,9 +74,15 @@ public class PromptService implements OnClickListener, OnCancelListener, OnItemC
|
||||
private PromptInput[] mInputs;
|
||||
private AlertDialog mDialog = null;
|
||||
private static LayoutInflater mInflater;
|
||||
private final static int PADDING_SIZE = 32; // in dip units
|
||||
private static int mPaddingSize = 0; // calculated from PADDING_SIZE. In pixel units
|
||||
|
||||
PromptService() {
|
||||
mInflater = LayoutInflater.from(GeckoApp.mAppContext);
|
||||
Resources res = GeckoApp.mAppContext.getResources();
|
||||
mPaddingSize = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
|
||||
PADDING_SIZE,
|
||||
res.getDisplayMetrics());
|
||||
}
|
||||
|
||||
private class PromptButton {
|
||||
@@ -441,6 +453,11 @@ public class PromptService implements OnClickListener, OnCancelListener, OnItemC
|
||||
if (mSelected[position] && listView != null) {
|
||||
listView.setItemChecked(position, true);
|
||||
}
|
||||
|
||||
if (item.inGroup) {
|
||||
ct.setPadding(mPaddingSize, 0, 0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception ex) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user