Can I hide a specific location in the Android Listview?

Asked 2 years ago, Updated 2 years ago, 60 views


        String[] _InitialSetup_Menu = new String[]
                {
                       "AA", "BB", "CC", "DD", "FF", "GG", "HH"
                };

_InitialSetup_List = (ListView) _Main_List.findViewById(R.id._Main_ListView);
        ArrayAdapter<String> __InitialSetup_Adapter = new ArrayAdapter<String>(this.getActivity(), R.layout.custom_menulist, R.id._Custom_MenuList_Text, _InitialSetup_Menu);
        _InitialSetup_List.setAdapter(__InitialSetup_Adapter);

If you have this ListView, is there any way to make the fourth DD visible only when a particular event occurs or change the color?

What I'm going to do now is

When there is a specific key event, For example, press the Menu key and press the UP key 3 times to open a menu called DD I want to do something like that. What should I do?

android listview

2022-09-22 14:18

1 Answers

When you make the list for the first time, can't you make the rest of the list except DD, and when a specific event comes in, can you create the list including DD again and update the adapter? Of course, in the case of color change, there may be a need to customize the adapter, but...


2022-09-22 14:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.