lewisjdeane / L-Dialogs

A small library replicating the new dialogs in android L.
567 stars 100 forks source link

Adding a custom View #10

Closed 1baga closed 10 years ago

1baga commented 10 years ago

I tried adding a layout file to the method and it kept flagging an error... then i tried using the .seContentView() still it kept flagging an error... which makes me confused...by "customView" what do you actually mean?....

1baga commented 10 years ago

sorry..solved the issue...i just inflated the layout and then used the .setCustomView()...

ghost commented 10 years ago

@1baga can you show some code snippets how you did it?

1baga commented 10 years ago

@extraRam

public void startDialog(){ CustomDialog.Builder builder = new CustomDialog.Builder(AddView.this, add_pres, positive); builder.darkTheme(false); builder.titleAlignment(BaseDialog.Alignment.CENTER); builder.titleColor("#e74c3c"); builder.positiveColor("#e74c3c"); CustomDialog cm = builder.build(); View vm = getLayoutInflater().inflate(R.layout.pres_details, null); cm.setCustomView(vm); cm.show(); }