diff --git a/app/src/main/java/com/hss01248/dialogutildemo/MainActivity.java b/app/src/main/java/com/hss01248/dialogutildemo/MainActivity.java index acf254d..5d2e3f3 100644 --- a/app/src/main/java/com/hss01248/dialogutildemo/MainActivity.java +++ b/app/src/main/java/com/hss01248/dialogutildemo/MainActivity.java @@ -415,7 +415,9 @@ public void onItemClick(CharSequence text, int position) { public void onBottomBtnClick() { showToast("onItemClick"); } - }).setTitle("人生若只如初见").show(); + }) + //.setTitle("人生若只如初见") + .show(); } break; case R.id.btn_ios_center_list: @@ -451,7 +453,9 @@ public void onItemClick(CharSequence text, int position) { public void onBottomBtnClick() { showToast("onItemClick"); } - }).setTitle("任选一个").show(); + }) + .setTitle("任选一个") + .show(); break; case R.id.btn_input: diff --git a/dialog/src/main/java/com/hss01248/dialog/ios/IosActionSheetHolder.java b/dialog/src/main/java/com/hss01248/dialog/ios/IosActionSheetHolder.java index 11bc548..1f05a99 100644 --- a/dialog/src/main/java/com/hss01248/dialog/ios/IosActionSheetHolder.java +++ b/dialog/src/main/java/com/hss01248/dialog/ios/IosActionSheetHolder.java @@ -104,7 +104,11 @@ public View getView(final int position, View convertView, ViewGroup parent) { Button view = (Button) root.findViewById(R.id.btn); if (getCount() >=2){ if (position ==0){ - view.setBackgroundResource(R.drawable.selector_btn_press_no_corner); + if(TextUtils.isEmpty(bean.title)){ + view.setBackgroundResource(R.drawable.selector_btn_press_all_top); + }else { + view.setBackgroundResource(R.drawable.selector_btn_press_no_corner); + } }else if (position == getCount() -1){ view.setBackgroundResource(R.drawable.selector_btn_press_all_bottom); }else { diff --git a/dialog/src/main/java/com/hss01248/dialog/ios/IosCenterItemHolder.java b/dialog/src/main/java/com/hss01248/dialog/ios/IosCenterItemHolder.java index 2915b0b..6897c71 100644 --- a/dialog/src/main/java/com/hss01248/dialog/ios/IosCenterItemHolder.java +++ b/dialog/src/main/java/com/hss01248/dialog/ios/IosCenterItemHolder.java @@ -82,7 +82,12 @@ public View getView(final int position, View convertView, ViewGroup parent) { Button view = (Button) root.findViewById(R.id.btn); if (getCount() >=2){ if (position ==0){ - view.setBackgroundResource(R.drawable.selector_btn_press_no_corner); + if(TextUtils.isEmpty(bean.title)){ + view.setBackgroundResource(R.drawable.selector_btn_press_all_top); + }else { + view.setBackgroundResource(R.drawable.selector_btn_press_no_corner); + } + }else if (position == getCount() -1){ view.setBackgroundResource(R.drawable.selector_btn_press_all_bottom); }else {