Get listview item position on button click

do you execute this btnNxt = (Button) findViewById(R.id.btnNext); btnNxt.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { //Here I need to get that position }); inside the getView method? if so it’s very easy btnNxt = (Button) findViewById(R.id.btnNext); btnNxt.setTag(position); btnNxt.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { int position=(Integer)arg0.getTag(); });

Change DialogFragment enter/exit transition at just before dismissing

You can do it inside your DialogFragment, without changing getDialog().getWindow() .getAttributes().windowAnimations You should animate “decor view” in onStart and onClick. This is the code snipped : Create Dialog first @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return new AlertDialog.Builder(getActivity()) .setTitle(“Hello from animated dialog :)”) .setNegativeButton(“Cancel”, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { //we … Read more

tech