adding new object to custom array adapter with help of alertdialog

Heading

Hi there

im trying to add new Client with help of dialog, but it’s looks like my edit text does not exist.
It’s looks like all id’s is right and all is good with activity live cycle, but i becoming

java.lang.NullPointerException: Attempt to invoke virtual method
‘android.text.Editable android.widget.EditText.getText()’ on a null
object reference at
dartdev.intent.MainActivity$3.onClick(MainActivity.java:122)

it’s on line

     String nameValue = clientName.getText().toString().trim();

can anyone explain what went wrong?

MainActivity.java

public class MainActivity extends Activity{

    ArrayList<Client> clientListItems = new ArrayList<Client>();
    ClientAdapter clientAdapter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_layout);

        initClients();

        clientAdapter = new ClientAdapter(this, clientListItems);
        ListView listView = (ListView) findViewById(R.id.listView);
        listView.setAdapter(clientAdapter);

        Button buttonView = (Button)findViewById(R.id.addListItem);

        buttonView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                setAddingDialog();

            }
        });



    }

    /*
    @Override
    protected void onStart() {
        super.onStart();
        Button buttonView = (Button)findViewById(R.id.addListItem);

        buttonView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                //listItems.add(0, Utils.hashGenerator(25));
                //adapter.notifyDataSetChanged();

                //DialogFragment newFragment = new AddingDialog();
                //newFragment.show(getFragmentManager(), "adding");
                setAddingDialog();

            }
        });
    }
    */

    void initClients(){
        clientListItems.add(new Client("alex", 1265, new Wallet("151516456464564654", 4564.56), R.drawable.ic_launcher_foreground));
        clientListItems.add(new Client("mike", 26, new Wallet("465456445644123231", 1645.2), R.drawable.ic_launcher_foreground));
        clientListItems.add(new Client("tray", 145, new Wallet("12315465489789", 0.00), R.drawable.ic_launcher_foreground));
        clientListItems.add(new Client("vincent", 999, new Wallet("3213546549789", 1000000.01), R.drawable.ic_launcher_foreground));
        clientListItems.add(new Client("venom", 666, new Wallet("321154654654798", 145.6), R.drawable.ic_launcher_foreground));
    }

    void setAddingDialog(){

        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        LayoutInflater inflater = getLayoutInflater();

        Dialog alertDialog = builder.create();

        final EditText clientName = (EditText) alertDialog.findViewById(R.id.newClientName);
        final EditText clientId = (EditText) alertDialog.findViewById(R.id.newClientId);
        final EditText clientWallet = (EditText) alertDialog.findViewById(R.id.newClientWallet);
        final EditText clientBalance = (EditText) alertDialog.findViewById(R.id.newClientBalance);

        builder.setView(inflater.inflate(R.layout.dialog_add_new_client, null))
                .setPositiveButton("add", new DialogInterface.OnClickListener(){
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        String nameValue = clientName.getText().toString().trim();
                        int idValue = Integer.valueOf(clientId.getText().toString().trim());
                        String walletValue = clientWallet.getText().toString().trim();
                        double balanceValue = Double.valueOf(clientBalance.getText().toString().trim());
                        clientListItems.add(new Client(nameValue, idValue, new Wallet(walletValue, balanceValue), R.drawable.ic_launcher_foreground));
                    }
                })
                .setNegativeButton("cancel", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        dialog.dismiss();
                    }
                })
                .show();

    }
}

dialog_add_new_client.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <EditText
        android:id="@+id/newClientName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"
        android:layout_marginTop="16dp"
        android:hint="name"
        android:inputType="text" />

    <EditText
        android:id="@+id/newClientId"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"
        android:layout_marginTop="16dp"
        android:hint="id"
        android:inputType="number" />

    <EditText
        android:id="@+id/newClientWallet"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"
        android:layout_marginTop="16dp"
        android:hint="walletNumber"
        android:inputType="text" />

    <EditText
        android:id="@+id/newClientBalance"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"
        android:layout_marginTop="16dp"
        android:hint="balance"
        android:inputType="numberDecimal" />

</LinearLayout>

adding new object to custom array adapter with help of alertdialog