Skip to content

Far5had70/CalculatorDialog

Repository files navigation

"# CalculatorDialog"

CalculatorDialog is a beautiful calculator dialog for Android.

Installation

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

	dependencies {
	        implementation 'com.github.Far5had70:CalculatorDialog:1.2.0'
	}

Step 2. Add the dependency

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Demo

You can try it out here Sample Application

Usage

Example:

                CalculatorDialog calculatorDialog = new CalculatorDialog()
                        .setAlertRadius(30)
                        .setCalc("0")
                        .setTextButton("ثبت")
                        .setBackgroundColor(getResources().getColor(R.color.colorPrimary))
                        .setButtonsTextColor(getResources().getColor(R.color.calc_white))
                        .setTypeFace(Typeface.createFromAsset(getAssets(), "bsans.ttf"))
                        .setListener(new Listener() {
                            @Override
                            public void OnSelectListener(int result) {
                                Toast.makeText(MainActivity.this, ""+result, Toast.LENGTH_SHORT).show();
                            }
                        });
                calculatorDialog.show(getSupportFragmentManager() , "");

Developed By

Farshad Asgharzadeh

For contact, shoot me an email at ferik800@gmail.com