Show different String Array Toast in 3 List View Flipper

543 Views Asked by At

I have 3 listview on my Flipper using diffrent linear layout

ListView list;
ListView list1;
ListView list2;

and I have String Arrays that has been converted from Array list.

ArrayList<String> TextLV1 = new ArrayList<String>(); 
String[] TextLv1;

I also have a flipper and pop up menu button called QuickAction in the flipper

mQuickAction
            .setOnActionItemClickListener(new QuickAction.OnActionItemClickListener() {
                @Override
                public void onItemClick(int pos) {
                    if (pos == 0) { // Add item selected
                        Toast.makeText(cobabikinflipper.this,
                                "Add item selected on row " + mSelectedRow + " " + TextLv[mSelectedRow],
                                Toast.LENGTH_SHORT).show();
                    } else if (pos == 1) { // Accept item selected
                        Toast.makeText(
                                cobabikinflipper.this,
                                "Accept item selected on row "
                                        + mSelectedRow, Toast.LENGTH_SHORT)
                                .show();
                    } else if (pos == 2) { // Upload item selected
                        startActivity(new Intent("com.binus.skripsi.marketdetail"));
                    } else if (pos == 3) { // Upload item selected
                        Toast.makeText(
                                cobabikinflipper.this,
                                "Lendski items selected on row "
                                        + mSelectedRow, Toast.LENGTH_SHORT)
                                .show();
                    }
                }
            });

When I click on the pop up menu (pos==0) the string array is right(it shows me the right String), But when i click on the others i cant change to the right string from the right listview. what should i do to solve the Condition?

When i Change the page, The pop up menu shows me the right String because i think the MQuick Action Pop up menu works not for 3 listview but All in one.. (Im sorry my english isn't so good)

i think here's the problem (**) ??

public void onItemClick(int pos) {
                    if (pos == 0) { // Add item selected
                        Toast.makeText(cobabikinflipper.this,
                                "Add item selected on row " + mSelectedRow + " " + **TextLv[mSelectedRow]**,
                                Toast.LENGTH_SHORT).show();
0

There are 0 best solutions below