조언해주신 댓글 참조해서 expandableListView의 child는 글자 색상 변경 시켰습니다.

그래서 group도 글자 색상 변경 시키지 위해서, xml하나 만들어 주고 child와 똑같이 textview하나 넣어주고 했습니다.

저 빨간 색으로 표시해놓은 부분을 R.layout.group 으로 바꾸어주면 실행시 튕겨 버리네요 ㅠㅠ

소스 첨부하였습니다.

소중한 조언 부탁드립니다.ㅠ


private TextView getGroupView(final View reuse, final ViewGroup parent) {

        if(reuse instanceof TextView) {

            return (TextView)reuse;

        } else {

            final Context context = parent.getContext();

            final LayoutInflater inflater = LayoutInflater.from(context);

            return (TextView)inflater.inflate(

                    android.R.layout.simple_expandable_list_item_1,

                    null);

        }

        

    }


    private ViewGroup getChildViewGroup(

            final View reuse,

            final ViewGroup parent) {


        if(reuse instanceof ViewGroup) {

            return (ViewGroup)reuse;

        } else {

            final Context context = parent.getContext();

            final LayoutInflater inflater = LayoutInflater.from(context);

            return (ViewGroup)inflater.inflate(

                    R.layout.child,

                    null);

        }

    }


public View getGroupView(

            final int group,

            final boolean expanded,

            final View reuse,

            final ViewGroup parent) {


        final TextView view = getGroupView(reuse, parent);

        view.setText(catagories[group].name);

        return view;

    }


    public View getChildView(

            final int group,

            final int child,

            final boolean lastChild,

            final View reuse,

            final ViewGroup parent) {


        final ViewGroup view = getChildViewGroup(reuse, parent);

        final PageSortingChild topping = catagories[group].toppings[child];


        ((TextView)view.findViewById(R.id.text)).setText(topping.name);




        return view;

    }