i want to add something like this in android studio when user click on button/cardview then they will see ad after showing ad i wanna do something like Toast or other
here is my java code
adbutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//before that i want to show ad and after showing ad i want to do this
int i = Integer.parseInt(pointstext.getText().toString());
pointstext.setText(String.valueOf(i + 150));
}
});
and XML
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="000000"
android:id="@+id/points"
android:layout_margin="8dp"
android:textColor="@color/white"
android:gravity="center"/>