去除某些Android手机系统上dialog顶部出现的分割线
/** * When using a custom Dialog, there will be a blue line at the top of the * dialog displayed on some Android devices, use this method to eliminate it */ private void hiddenTopDivider() { Context context = getContext(); int dividerId = context.getResources().getIdentifier("android:id/titleDivider", null, null); View divider = findViewById(dividerId); if (divider != null) { divider.setBackgroundColor(Color.TRANSPARENT); } }