i have some problems in java Calss i cant get EditText as string : > package com.example.dato.task;
> 
> 
> 
> import android.app.DialogFragment; import android.os.Bundle; import
> android.support.annotation.Nullable; import
> android.view.LayoutInflater; import android.view.View; import
> android.view.ViewGroup; import android.view.Window; import
> android.widget.Button; import android.widget.EditText; /**  * Created
> by DATO on 2/17/2018.  */
> 
> public class DialogClass extends DialogFragment{
> 
>     public DialogClass(){}
> 
>     String s;
>     String s1;
> 
>     @Nullable
>     @Override
>     public View onCreateView( LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
>         final View dialogView= View.inflate(getActivity(), R.layout.dialog, null);
> 
>         getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
> 
>           final EditText e1 = dialogView.findViewById(R.id.text1);
>           final EditText e2= dialogView.findViewById(R.id.text2);
>              Button bt = dialogView.findViewById(R.id.button);
> 
> 
> 
>         bt.setOnClickListener(new View.OnClickListener() {
>             @Override
>             public void onClick(View view){
>             s = e1.getText().toString();
>             s1 = e2.getText().toString();
>             dismiss();
>             }
>         });
> 
>         return dialogView;
>     }
> 

 }

