use of com.orhanobut.dialogplus.DialogPlusBuilder in project dialogplus by orhanobut.
the class DialogPlusBuilderTest method testContentLayoutParams_whenExpandedTrueAndNotSet.
@Test
public void testContentLayoutParams_whenExpandedTrueAndNotSet() {
DialogPlusBuilder builder = DialogPlus.newDialog(context);
builder.setExpanded(true);
assertThat(builder.getContentParams()).isInstanceOf(FrameLayout.LayoutParams.class);
//when not expanded
FrameLayout.LayoutParams params = builder.getContentParams();
assertThat(builder.isExpanded()).isTrue();
assertThat(params.width).isEqualTo(ViewGroup.LayoutParams.MATCH_PARENT);
assertThat(params.height).isEqualTo(builder.getDefaultContentHeight());
assertThat(params.gravity).isEqualTo(Gravity.BOTTOM);
}
use of com.orhanobut.dialogplus.DialogPlusBuilder in project dialogplus by orhanobut.
the class DialogPlusBuilderTest method testAdapter.
@Test
public void testAdapter() {
ArrayAdapter<String> adapter = new ArrayAdapter<>(context, android.R.layout.simple_list_item_1, new String[] { "234" });
DialogPlusBuilder builder = DialogPlus.newDialog(context).setAdapter(adapter);
assertThat(builder.getAdapter()).isEqualTo(adapter);
}
use of com.orhanobut.dialogplus.DialogPlusBuilder in project dialogplus by orhanobut.
the class DialogPlusBuilderTest method testOutAnimation.
@Test
public void testOutAnimation() {
DialogPlusBuilder builder = DialogPlus.newDialog(context);
assertThat(builder.getOutAnimation()).isNotNull();
//TODO
}
Aggregations