android-dialog-builder


Source link: https://github.com/amphiaraus/android-dialog-builder

warning

The library was suspended on April 1, 2017

android-dialog-builder

This is an android in the Dialog library, not based on a systematic way to achieve Dialog using Activity root view of the Add Dialog, it has strong scalability and customizability!

For more information please see the website

Screenshots

android-dialog-builder with Java code

public void onClick(View v){

if(v.getId() == R.id.left){

 DialogBuilder builder = new DialogBuilder(this)

.setAnimation(R.anim.da_slide_in_left, R.anim.da_slide_out_left)

//.setIgnoreStatusBar(false)

.setLayoutParams(700, ViewGroup.LayoutParams.MATCH_PARENT)

.setGravity(Gravity.LEFT)

.setOnItemClickListener(this)

.setBackgroundResource(R.color.toolbar_background);

 ListMasterDialog dialog = new ListMasterDialog(builder);

 dialog.setAdapter(new TextDialogAdapter(this,getSimpleStringData(8)));

 dialog.show();

}
else if(v.getId() == R.id.top){

 DialogBuilder builder = new DialogBuilder(this)

.setAnimation(R.anim.da_slide_in_top, R.anim.da_slide_out_top)

//.setIgnoreStatusBar(false)

.setGravity(Gravity.TOP)

.setOnItemClickListener(this)

.setBackgroundResource(R.color.toolbar_background);

 ListMasterDialog dialog = new ListMasterDialog(builder);

 dialog.setCancelButton(false);

 dialog.setAdapter(new TextDialogAdapter(this,getSimpleStringData(3)));

 dialog.show();

}
else if(v.getId() == R.id.right){

 DialogBuilder builder = new DialogBuilder(this)

.setAnimation(R.anim.da_slide_in_right, R.anim.da_slide_out_right)

//.setIgnoreStatusBar(false)

.setLayoutParams(700, ViewGroup.LayoutParams.MATCH_PARENT)

.setGravity(Gravity.RIGHT)

.setOnItemClickListener(this)

.setBackgroundResource(R.color.toolbar_background);

 ListMasterDialog dialog = new ListMasterDialog(builder);

 dialog.setAdapter(new TextDialogAdapter(this,getSimpleStringData(8)));

 dialog.show();

}
else if(v.getId() == R.id.bottom){

 DialogBuilder builder = new DialogBuilder(this)

.setAnimation(R.anim.da_slide_in_bottom, R.anim.da_slide_out_bottom)

.setOnItemClickListener(this)

//.setIgnoreStatusBar(false)

.setGravity(Gravity.BOTTOM);

 ListMasterDialog dialog = new ListMasterDialog(builder);

 dialog.setAdapter(new TextDialogAdapter(this,getSimpleStringData(4)));

 dialog.show();

}
else if(v.getId() == R.id.center){

 DialogBuilder builder = new DialogBuilder(this)

.setOnItemClickListener(this)

.setAnimation(R.anim.da_fade_in_center, R.anim.da_fade_out_center)

//.setIgnoreStatusBar(false)

.setGravity(Gravity.CENTER);

 AlertMasterDialog dialog = new AlertMasterDialog(builder);

 dialog.setTitle("??");

 dialog.setContent("??????????????????????????\n" +

"??????????????????????????????????????\n" +

"???????????????????????????????????\n" +

"???????????????????????????????");

 dialog.show();

}
else if(v.getId() == R.id.center1){

 DialogBuilder builder = new DialogBuilder(this)

.setAnimation(R.anim.da_fade_in_center, R.anim.da_fade_out_center)

.setOnItemClickListener(this)

//.setIgnoreStatusBar(false)

.setGravity(Gravity.CENTER);

 AlertMasterDialog dialog = new AlertMasterDialog(builder);

 dialog.setTitle("??");

 dialog.setButton2("??");

 dialog.setContent("??????????????????????????\n" +

"??????????????????????????????????????\n" +

"???????????????????????????????????\n" +

"???????????????????????????????");

 dialog.show();

}
else if(v.getId() == R.id.grid){

 DialogBuilder builder = new DialogBuilder(this)

.setAnimation(R.anim.da_slide_in_bottom, R.anim.da_slide_out_bottom)

.setOnItemClickListener(this)

//.setIgnoreStatusBar(false)

.setGravity(Gravity.BOTTOM);

 GridMasterDialog dialog = new GridMasterDialog(builder);

 dialog.setAdapter(new GridDialogAdapter(this, getSimpleGridModelData()));

 dialog.setNumColumns(4);

 dialog.show();

}

  
}

private GridModel[] getSimpleGridModelData(){

return new GridModel[]{

  new GridModel(R.mipmap.share_layout_qq_icon,"QQ"),

  new GridModel(R.mipmap.share_layout_wx_icon,"??"),

  new GridModel(R.mipmap.share_layout_friends_icon,"???"),

  new GridModel(R.mipmap.share_layout_qq_icon,"QQ"),

  new GridModel(R.mipmap.share_layout_wx_icon,"??"),

  new GridModel(R.mipmap.share_layout_friends_icon,"???")

}
;
  
}

private String[] getSimpleStringData(int size){

String[] array = new String[size];

for (int i= 0;i< size ;i++){

 array[i] = "SIMPLE-DATA" + i;

}

return array;
  
}

@Override
  public void onItemClick(MasterDialog dialog, View view, int position) {

Toast.makeText(this,"Item click:" + position,Toast.LENGTH_SHORT).show();

  
}

Maven

<dependency>
  <groupId>net.soulwolf.widget</groupId>  <url>https://dl.bintray.com/soulwolf/maven</url>
  <artifactId>dialogBuilder</artifactId>
  <version>1.0.0</version> </dependency> 

Gradle

allprojects {

 repositories {

 jcenter()
 
}
 
}
  compile 'net.soulwolf.widget:dialogBuilder:1.0.0' 

Developed by

Ching Soulwolf - [email protected]

License

Copyright 2015 Soulwolf Ching Copyright 2015 The Android Open Source Project for android-dialog-builder  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

This little Project written by Kotlin used Retrofit and Rxjava and so on. Pull data from Readhub which is a news aggregator website in China.

An android custom view for emoji style rating selection.

With this library you can use iOS UIAlertView on Android.

A custom TextView which shows placeholder lines given a sample text when it has no text set.

MultiFontViewKotlin library can be used to select custom fonts for the view dynamically in your XML.

Try<T> computation for RxJava to produce non-interrupted stream.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes