我想删除对话框外的透明暗背景.

我尝试过:
final Dialog dialog = new Dialog(this);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.WHITE));
this.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.WHITE));
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.spinner_layout);
getWindow().getDecorView().setBackgroundResource(android.R.color.transparent);
Run Code Online (Sandbox Code Playgroud) 我尝试使用自定义操作栏作为:
bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
bar.setCustomView(R.layout.xyz);
Run Code Online (Sandbox Code Playgroud)
但导航抽屉变得不可见.
我想绘制一个完美的圆形按钮.我尝试使用以下代码:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<stroke
android:width="3dip"
android:color="#065a32" />
<corners android:radius="10dip"/>
<solid android:color="#eaebec" />
</shape>
Run Code Online (Sandbox Code Playgroud)
但即使我更改参数,我也只能绘制椭圆形状:
<stroke
android:width="3dip"/>
<corners android:radius="10dip"/>
Run Code Online (Sandbox Code Playgroud)
我的截图:

我已经尝试过这个网站的不同链接,但没有一个满足我的需要.
编辑:
我的getView()代码是:
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (convertView == null) {
LayoutInflater vi = (LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.calendar_item, null);
}
view.setBackgroundResource(R.drawable.calendar_cell_clicked);
}
Run Code Online (Sandbox Code Playgroud) 我的数据集格式如下所示:
8,2,1,1,1,0,3,2,6,2,2,2,2
8,2,1,2,0,0,15,2,1,2,2,2,1
5,5,4,4,0,0,6,1,6,2,2,1,2
8,2,1,3,0,0,2,2,6,2,2,2,2
8,2,1,2,0,0,3,2,1,2,2,2,1
8,2,1,4,0,1,3,2,1,2,2,2,1
8,2,1,2,0,0,3,2,1,2,2,2,1
8,2,1,3,0,0,2,2,6,2,2,2,2
8,2,1,12,0,0,5,2,2,2,2,2,1
3,1,1,2,0,0,3,2,1,2,2,2,1
Run Code Online (Sandbox Code Playgroud)
它由所有分类数据组成,其中每个特征均以数字形式编码。我尝试使用以下代码:
monthly_income = tf.contrib.layers.sparse_column_with_keys("monthly_income", keys=['1','2','3','4','5','6'])
#Other columns are also declared in the same way
m = tf.contrib.learn.LinearClassifier(feature_columns=[
caste, religion, differently_abled, nature_of_activity, school, dropout, qualification,
computer_literate, monthly_income, smoke,drink,tobacco,sex],
model_dir=model_dir)
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误:
TypeError: Signature mismatch. Keys must be dtype <dtype: 'string'>, got <dtype: 'int64'>.
Run Code Online (Sandbox Code Playgroud) 我想从字符串中删除"["和"]"字符.
我的代码是:
String original=data.replaceAll("]|[", "");
Run Code Online (Sandbox Code Playgroud)
我收到错误:
09-19 13:25:55.755: E/AndroidRuntime(25007): FATAL EXCEPTION: main
09-19 13:25:55.755: E/AndroidRuntime(25007): java.util.regex.PatternSyntaxException: Syntax error U_REGEX_MISSING_CLOSE_BRACKET near index 3:
09-19 13:25:55.755: E/AndroidRuntime(25007): ]|[
09-19 13:25:55.755: E/AndroidRuntime(25007): ^
09-19 13:25:55.755: E/AndroidRuntime(25007): at com.ibm.icu4jni.regex.NativeRegEx.open(Native Method)
09-19 13:25:55.755: E/AndroidRuntime(25007): at java.util.regex.Pattern.compileImpl(Pattern.java:383)
09-19 13:25:55.755: E/AndroidRuntime(25007): at java.util.regex.Pattern.<init>(Pattern.java:341)
09-19 13:25:55.755: E/AndroidRuntime(25007): at java.util.regex.Pattern.compile(Pattern.java:358)
09-19 13:25:55.755: E/AndroidRuntime(25007): at java.lang.String.replaceAll(String.java:2004)
Run Code Online (Sandbox Code Playgroud)