Example usage for android.view ViewGroup setClickable

List of usage examples for android.view ViewGroup setClickable

Introduction

In this page you can find the example usage for android.view ViewGroup setClickable.

Prototype

public void setClickable(boolean clickable) 

Source Link

Document

Enables or disables click events for this view.

Usage

From source file:com.quuzz.tbg.recyclerview.CustomAdapter.java

@Override
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
    viewGroup.setClickable(true);
    // Create a new view.
    View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.text_row_item, viewGroup, false);

    return new ViewHolder(v, viewGroup);
}

From source file:com.capricorn.ArcMenu.java

private void init(Context context) {
    LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    li.inflate(R.layout.arc_menu, this);

    mArcLayout = (ArcLayout) findViewById(R.id.item_layout);

    final ViewGroup controlLayout = (ViewGroup) findViewById(R.id.control_layout);
    controlLayout.setClickable(true);
    controlLayout.setOnTouchListener(new OnTouchListener() {

        @Override//from  w ww.  java  2 s.co  m
        public boolean onTouch(View v, MotionEvent event) {
            if (event.getAction() == MotionEvent.ACTION_DOWN) {
                if (userOnTouch != null)
                    userOnTouch.onTouch(v, event);

                mHintView.startAnimation(createHintSwitchAnimation(mArcLayout.isExpanded()));
                mArcLayout.switchState(true);
            }

            return false;
        }
    });

    mHintView = (ImageView) findViewById(R.id.control_hint);
}

From source file:io.v.syncslides.NavigateFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    Bundle bundle = savedInstanceState;// w ww .  j a  v a  2 s .c o m
    if (bundle == null) {
        bundle = getArguments();
    }
    String sessionId = bundle.getString(SESSION_ID_KEY);
    try {
        mSession = DB.Singleton.get().getSession(sessionId);
    } catch (VException e) {
        handleFatalError("Failed to fetch Session", e);
    }

    final View rootView = inflater.inflate(R.layout.fragment_navigate, container, false);

    //        mFabSync = rootView.findViewById(R.id.audience_sync_fab);
    //        if (((PresentationActivity) getActivity()).getSynced() || mRole != Role.AUDIENCE) {
    //            mFabSync.setVisibility(View.INVISIBLE);
    //        } else {
    //            mFabSync.setVisibility(View.VISIBLE);
    //        }
    //
    //        mFabSync.setOnClickListener(new NavigateClickListener() {
    //            @Override
    //            public void onClick(View v) {
    //                super.onClick(v);
    //                sync();
    //                mFabSync.setVisibility(View.INVISIBLE);
    //            }
    //        });
    View.OnClickListener previousSlideListener = new NavigateClickListener() {
        @Override
        void onNavigate() {
            previousSlide();
        }
    };
    View arrowBack = rootView.findViewById(R.id.arrow_back);
    arrowBack.setOnClickListener(previousSlideListener);
    mPrevThumb = (ImageView) rootView.findViewById(R.id.prev_thumb);
    mPrevThumb.setOnClickListener(previousSlideListener);

    View.OnClickListener nextSlideListener = new NavigateClickListener() {
        @Override
        void onNavigate() {
            nextSlide();
        }
    };
    // Show either the arrowForward or the FAB but not both.
    View arrowForward = rootView.findViewById(R.id.arrow_forward);
    View fabForward = rootView.findViewById(R.id.primary_navigation_fab);
    //        if (mRole == Role.PRESENTER) {
    //            arrowForward.setVisibility(View.INVISIBLE);
    //            fabForward.setOnClickListener(nextSlideListener);
    //        } else {
    fabForward.setVisibility(View.INVISIBLE);
    arrowForward.setOnClickListener(nextSlideListener);
    //        }
    mNextThumb = (ImageView) rootView.findViewById(R.id.next_thumb);
    mNextThumb.setOnClickListener(nextSlideListener);
    //        mQuestions = (ImageView) rootView.findViewById(R.id.questions);
    //        // TODO(kash): Hide the mQuestions button if mRole == BROWSER.
    //        mQuestions.setOnClickListener(new NavigateClickListener() {
    //            @Override
    //            public void onClick(View v) {
    //                super.onClick(v);
    //                questionButton();
    //            }
    //        });
    mCurrentSlide = (ImageView) rootView.findViewById(R.id.slide_current_medium);
    mCurrentSlide.setOnClickListener(new NavigateClickListener() {
        @Override
        public void onNavigate() {
            // TODO(kash): Disallow presenter from switching to fullscreen.
            ((PresentationActivity) getActivity()).showFullscreenSlide();
        }
    });

    mSlideNumText = (TextView) rootView.findViewById(R.id.slide_num_text);
    mNotes = (EditText) rootView.findViewById(R.id.notes);
    mNotes.setOnFocusChangeListener((v, hasFocus) -> {
        if (hasFocus) {
            ((PresentationActivity) getActivity()).getSupportActionBar().show();
            mEditing = true;
            getActivity().invalidateOptionsMenu();
            // We don't want the presentation to advance while the user
            // is editing the notes.  Force the app to stay on this slide.
            try {
                mSession.setLocalSlideNum(mSlideNum);
            } catch (VException e) {
                handleFatalError("Could not set local slide num", e);
            }
        }
    });

    // The parent of mNotes needs to be focusable in order to clear focus
    // from mNotes when done editing.  We set the attributes in code rather
    // than in XML because it is too easy to add an extra level of layout
    // in XML and forget to add these attributes.
    ViewGroup parent = (ViewGroup) mNotes.getParent();
    parent.setFocusable(true);
    parent.setClickable(true);
    parent.setFocusableInTouchMode(true);

    //        View slideListIcon = rootView.findViewById(R.id.slide_list);
    //        slideListIcon.setOnClickListener(new NavigateClickListener() {
    //            @Override
    //            public void onClick(View v) {
    //                super.onClick(v);
    //                if (mRole == Role.AUDIENCE) {
    //                    ((PresentationActivity) getActivity()).showSlideList();
    //                } else {
    //                    getActivity().getSupportFragmentManager().popBackStack();
    //                }
    //            }
    //        });
    //        mQuestionsNum = (TextView) rootView.findViewById(R.id.questions_num);
    //        // Start off invisible for everyone.  If there are questions, this
    //        // will be set to visible in the mDB.getQuestionerList() callback.
    //        mQuestionsNum.setVisibility(View.INVISIBLE);
    //
    //        mDB = DB.Singleton.get(getActivity().getApplicationContext());
    //        mDB.getSlides(mDeckId, new DB.Callback<List<Slide>>() {
    //            @Override
    //            public void done(List<Slide> slides) {
    //                mSlides = slides;
    //                // The CurrentSlideListener could have been notified while we were waiting for
    //                // the slides to load.
    //                if (mLoadingCurrentSlide != -1) {
    //                    currentSlideChanged(mLoadingCurrentSlide);
    //                }
    //                updateView();
    //            }
    //        });
    //        if (((PresentationActivity) getActivity()).getSynced()) {
    //            sync();
    //        } else {
    //            unsync();
    //        }

    return rootView;
}

From source file:com.dgsd.android.ShiftTracker.Fragment.EditShiftFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_edit_shift, container, false);

    mName = (StatefulAutoCompleteTextView) v.findViewById(R.id.name);
    mNotes = (StatefulEditText) v.findViewById(R.id.notes);
    mPayRate = (StatefulEditText) v.findViewById(R.id.pay_rate);
    mUnpaidBreak = (StatefulEditText) v.findViewById(R.id.unpaid_break);
    mStartDate = (TextView) v.findViewById(R.id.start_date);
    mEndDate = (TextView) v.findViewById(R.id.end_date);
    mStartTime = (TextView) v.findViewById(R.id.start_time);
    mEndTime = (TextView) v.findViewById(R.id.end_time);
    mSaveAsTemplate = (CheckBox) v.findViewById(R.id.is_template);
    mReminders = v.findViewById(R.id.reminders);

    ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getActivity(),
            R.layout.reminders_spinner_item, mRemindersLabels);
    adapter.setDropDownViewResource(R.layout.reminders_spinner_dropdown_item);
    setAdapter(mReminders, adapter);//from  w w w  .  ja v a2s.c om

    if (StApp.isFreeApp(getActivity())) {
        mReminders.setEnabled(false);
        mReminders.setClickable(false);
        ViewGroup parent = ((ViewGroup) mReminders.getParent());
        parent.setClickable(true);
        parent.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (mLinkToPaidAppFragment != null && mLinkToPaidAppFragment.isResumed())
                    return; //Already showing

                mLinkToPaidAppFragment = LinkToPaidAppFragment
                        .newInstance(getString(R.string.reminders_unavailable_message));
                mLinkToPaidAppFragment.show(getSherlockActivity().getSupportFragmentManager(), null);
            }
        });
    }

    mStartDate.setOnClickListener(this);
    mEndDate.setOnClickListener(this);
    mStartTime.setOnClickListener(this);
    mEndTime.setOnClickListener(this);

    mNameAdapter = new SimpleCursorAdapter(getActivity(), android.R.layout.simple_list_item_1, null,
            new String[] { DbField.NAME.name }, new int[] { android.R.id.text1 }, 0);
    mNameAdapter.setStringConversionColumn(0);//Index of 'Name' column
    mName.setAdapter(mNameAdapter);

    mName.addTextChangedListener(new TextWatcher() {
        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
        }

        @Override
        public void afterTextChanged(Editable editable) {
            mName.setError(null);

            mLastNameFilter = mName.getText() == null ? null : mName.getText().toString();
            getLoaderManager().restartLoader(LOADER_ID_NAMES, null, EditShiftFragment.this);
        }
    });

    mUnpaidBreak.addTextChangedListener(new TextWatcher() {
        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
        }

        @Override
        public void afterTextChanged(Editable editable) {
            mUnpaidBreak.setError(null);
        }
    });

    return v;
}

From source file:io.v.android.apps.syncslides.NavigateFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    Bundle args;//w ww  .  jav a 2 s  . c o  m
    if (savedInstanceState != null) {
        args = savedInstanceState;
    } else {
        args = getArguments();
    }
    mDeckId = args.getString(DECK_ID_KEY);
    mPresentationId = args.getString(PRESENTATION_ID_KEY);
    mLoadingCurrentSlide = -1;
    mCurrentSlideNum = mUserSlideNum = args.getInt(SLIDE_NUM_KEY);
    mRole = (Role) args.get(ROLE_KEY);
    final View rootView = inflater.inflate(R.layout.fragment_navigate, container, false);
    mFabSync = rootView.findViewById(R.id.audience_sync_fab);
    if (((PresentationActivity) getActivity()).getSynced() || mRole != Role.AUDIENCE) {
        mFabSync.setVisibility(View.INVISIBLE);
    } else {
        mFabSync.setVisibility(View.VISIBLE);
    }

    mFabSync.setOnClickListener(new NavigateClickListener() {
        @Override
        public void onClick(View v) {
            super.onClick(v);
            sync();
            mFabSync.setVisibility(View.INVISIBLE);
        }
    });
    View.OnClickListener previousSlideListener = new NavigateClickListener() {
        @Override
        public void onClick(View v) {
            super.onClick(v);
            previousSlide();
        }
    };
    View arrowBack = rootView.findViewById(R.id.arrow_back);
    arrowBack.setOnClickListener(previousSlideListener);
    mPrevThumb = (ImageView) rootView.findViewById(R.id.prev_thumb);
    mPrevThumb.setOnClickListener(previousSlideListener);

    View.OnClickListener nextSlideListener = new NavigateClickListener() {
        @Override
        public void onClick(View v) {
            super.onClick(v);
            nextSlide();
        }
    };
    // Show either the arrowForward or the FAB but not both.
    View arrowForward = rootView.findViewById(R.id.arrow_forward);
    View fabForward = rootView.findViewById(R.id.primary_navigation_fab);
    if (mRole == Role.PRESENTER) {
        arrowForward.setVisibility(View.INVISIBLE);
        fabForward.setOnClickListener(nextSlideListener);
    } else {
        fabForward.setVisibility(View.INVISIBLE);
        arrowForward.setOnClickListener(nextSlideListener);
    }
    mNextThumb = (ImageView) rootView.findViewById(R.id.next_thumb);
    mNextThumb.setOnClickListener(nextSlideListener);
    mQuestions = (ImageView) rootView.findViewById(R.id.questions);
    // TODO(kash): Hide the mQuestions button if mRole == BROWSER.
    mQuestions.setOnClickListener(new NavigateClickListener() {
        @Override
        public void onClick(View v) {
            super.onClick(v);
            questionButton();
        }
    });
    mCurrentSlide = (ImageView) rootView.findViewById(R.id.slide_current_medium);
    mCurrentSlide.setOnClickListener(new NavigateClickListener() {
        @Override
        public void onClick(View v) {
            super.onClick(v);
            if (mRole == Role.AUDIENCE || mRole == Role.BROWSER) {
                ((PresentationActivity) getActivity()).showFullscreenSlide(mUserSlideNum);
            }
        }
    });

    mSlideNumText = (TextView) rootView.findViewById(R.id.slide_num_text);
    mNotes = (EditText) rootView.findViewById(R.id.notes);
    mNotes.setOnFocusChangeListener(new View.OnFocusChangeListener() {
        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            ((PresentationActivity) getActivity()).getSupportActionBar().show();
            mEditing = hasFocus;
            getActivity().invalidateOptionsMenu();
            unsync();
        }
    });

    // The parent of mNotes needs to be focusable in order to clear focus
    // from mNotes when done editing.  We set the attributes in code rather
    // than in XML because it is too easy to add an extra level of layout
    // in XML and forget to add these attributes.
    ViewGroup parent = (ViewGroup) mNotes.getParent();
    parent.setFocusable(true);
    parent.setClickable(true);
    parent.setFocusableInTouchMode(true);

    View slideListIcon = rootView.findViewById(R.id.slide_list);
    slideListIcon.setOnClickListener(new NavigateClickListener() {
        @Override
        public void onClick(View v) {
            super.onClick(v);
            if (mRole == Role.AUDIENCE) {
                ((PresentationActivity) getActivity()).showSlideList();
            } else {
                getActivity().getSupportFragmentManager().popBackStack();
            }
        }
    });
    mQuestionsNum = (TextView) rootView.findViewById(R.id.questions_num);
    // Start off invisible for everyone.  If there are questions, this
    // will be set to visible in the mDB.getQuestionerList() callback.
    mQuestionsNum.setVisibility(View.INVISIBLE);

    mDB = DB.Singleton.get(getActivity().getApplicationContext());
    mDB.getSlides(mDeckId, new DB.Callback<List<Slide>>() {
        @Override
        public void done(List<Slide> slides) {
            mSlides = slides;
            // The CurrentSlideListener could have been notified while we were waiting for
            // the slides to load.
            if (mLoadingCurrentSlide != -1) {
                currentSlideChanged(mLoadingCurrentSlide);
            }
            updateView();
        }
    });
    if (((PresentationActivity) getActivity()).getSynced()) {
        sync();
    } else {
        unsync();
    }

    return rootView;
}

From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java

public ArrayAdapter contextsupport(final boolean paramBoolean) {
      ArrayList localArrayList = new ArrayList();
      localArrayList.add(new Patterns(Utils.getText(2131165703), true));
      localArrayList.add(new Patterns(Utils.getText(2131165699), true));
      localArrayList.add(new Patterns(Utils.getText(2131165701), false));
      if (!paramBoolean) {
          localArrayList.add(new Patterns(Utils.getText(2131165358), false));
          localArrayList.add(new Patterns(Utils.getText(2131165360), false));
          localArrayList.add(new Patterns(Utils.getText(2131165362), false));
      }//from  ww  w. j av a2 s  .com
      if ((all_d != null) && (all_d.adapter != null)) {
          all_d.adapter.notifyDataSetChanged();
      }
      new ArrayAdapter(getContext(), 2130968605, localArrayList) {
          TextView txtStatus;
          TextView txtTitle;

          public View getView(int paramAnonymousInt, View paramAnonymousView, ViewGroup paramAnonymousViewGroup) {
              paramAnonymousView = (Patterns) getItem(paramAnonymousInt);
              View localView = ((LayoutInflater) listAppsFragment.getInstance()
                      .getSystemService("layout_inflater")).inflate(2130968633, paramAnonymousViewGroup, false);
              this.txtTitle = ((TextView) localView.findViewById(2131558483));
              this.txtStatus = ((TextView) localView.findViewById(2131558484));
              this.txtTitle.setTextAppearance(getContext(), listAppsFragment.getSizeText());
              this.txtStatus.setTextAppearance(getContext(), listAppsFragment.getSizeText());
              paramAnonymousViewGroup = (CheckBox) localView.findViewById(2131558535);
              paramAnonymousViewGroup.setChecked(paramAnonymousView.Status);
              paramAnonymousViewGroup.setClickable(false);
              this.txtStatus.setTextAppearance(getContext(), 16973894);
              this.txtStatus.setTextColor(-7829368);
              this.txtTitle.setTextColor(-1);
              this.txtTitle.setText(((Patterns) getItem(paramAnonymousInt)).Name);
              this.txtTitle.setTypeface(null, 1);
              paramAnonymousView = ((Patterns) getItem(paramAnonymousInt)).Name;
              if ((paramAnonymousInt == 3) || (paramAnonymousInt == 4)) {
                  this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ffffff00", "bold"));
              }
              for (;;) {
                  if (paramAnonymousInt == 0) {
                      paramAnonymousView = Utils.getText(2131165704);
                  }
                  if (paramAnonymousInt == 1) {
                      paramAnonymousView = Utils.getText(2131165700);
                  }
                  if (paramAnonymousInt == 2) {
                      paramAnonymousView = Utils.getText(2131165702);
                  }
                  paramAnonymousViewGroup = paramAnonymousView;
                  if (!paramBoolean) {
                      if (paramAnonymousInt == 3) {
                          paramAnonymousView = Utils.getText(2131165359);
                      }
                      if (paramAnonymousInt == 4) {
                          paramAnonymousView = Utils.getText(2131165361);
                      }
                      paramAnonymousViewGroup = paramAnonymousView;
                      if (paramAnonymousInt == 5) {
                          paramAnonymousViewGroup = Utils.getText(2131165363);
                      }
                  }
                  this.txtStatus.append(Utils.getColoredText(paramAnonymousViewGroup, "#ff888888", "italic"));
                  return localView;
                  if (paramAnonymousInt == 5) {
                      this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ffff0000", "bold"));
                  } else {
                      this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ff00ff00", "bold"));
                  }
              }
          }
      };
  }

From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java

public ArrayAdapter contextselpatchlvl(final boolean paramBoolean) {
      ArrayList localArrayList = new ArrayList();
      localArrayList.add(new Patterns(Utils.getText(2131165352), true));
      localArrayList.add(new Patterns(Utils.getText(2131165354), false));
      localArrayList.add(new Patterns(Utils.getText(2131165356), false));
      localArrayList.add(new Patterns(Utils.getText(2131165349), false));
      localArrayList.add(new Patterns(Utils.getText(2131165364), false));
      localArrayList.add(new Patterns(Utils.getText(2131165264), false));
      if (paramBoolean) {
          localArrayList.add(new Patterns(Utils.getText(2131165358), false));
      }//from  w  w  w  .ja  v a 2s .  c  o  m
      if (paramBoolean) {
          localArrayList.add(new Patterns(Utils.getText(2131165360), false));
      }
      if (paramBoolean) {
          localArrayList.add(new Patterns(Utils.getText(2131165362), false));
      }
      if ((all_d != null) && (all_d.adapter != null)) {
          all_d.adapter.notifyDataSetChanged();
      }
      new ArrayAdapter(getContext(), 2130968605, localArrayList) {
          TextView txtStatus;
          TextView txtTitle;

          public View getView(int paramAnonymousInt, View paramAnonymousView, ViewGroup paramAnonymousViewGroup) {
              paramAnonymousView = (Patterns) getItem(paramAnonymousInt);
              View localView = ((LayoutInflater) listAppsFragment.getInstance()
                      .getSystemService("layout_inflater")).inflate(2130968633, paramAnonymousViewGroup, false);
              this.txtTitle = ((TextView) localView.findViewById(2131558483));
              this.txtStatus = ((TextView) localView.findViewById(2131558484));
              this.txtTitle.setTextAppearance(getContext(), listAppsFragment.getSizeText());
              this.txtStatus.setTextAppearance(getContext(), listAppsFragment.getSizeText());
              paramAnonymousViewGroup = (CheckBox) localView.findViewById(2131558535);
              paramAnonymousViewGroup.setChecked(paramAnonymousView.Status);
              paramAnonymousViewGroup.setClickable(false);
              this.txtStatus.setTextAppearance(getContext(), 16973894);
              this.txtStatus.setTextColor(-7829368);
              this.txtTitle.setTextColor(-1);
              this.txtTitle.setText(((Patterns) getItem(paramAnonymousInt)).Name);
              this.txtTitle.setTypeface(null, 1);
              paramAnonymousView = ((Patterns) getItem(paramAnonymousInt)).Name;
              if (((paramAnonymousInt == 6) || (paramAnonymousInt == 7)) && (paramBoolean)) {
                  this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ffffff00", "bold"));
              }
              for (;;) {
                  if (paramAnonymousInt == 0) {
                      paramAnonymousView = Utils.getText(2131165353);
                  }
                  if (paramAnonymousInt == 1) {
                      paramAnonymousView = Utils.getText(2131165355);
                  }
                  if (paramAnonymousInt == 2) {
                      paramAnonymousView = Utils.getText(2131165357);
                  }
                  if (paramAnonymousInt == 3) {
                      paramAnonymousView = Utils.getText(2131165350);
                  }
                  if (paramAnonymousInt == 4) {
                      paramAnonymousView = Utils.getText(2131165365);
                  }
                  paramAnonymousViewGroup = paramAnonymousView;
                  if (paramAnonymousInt == 5) {
                      paramAnonymousViewGroup = Utils.getText(2131165351);
                  }
                  paramAnonymousView = paramAnonymousViewGroup;
                  if (paramAnonymousInt == 6) {
                      paramAnonymousView = paramAnonymousViewGroup;
                      if (paramBoolean) {
                          paramAnonymousView = Utils.getText(2131165359);
                      }
                  }
                  paramAnonymousViewGroup = paramAnonymousView;
                  if (paramAnonymousInt == 7) {
                      paramAnonymousViewGroup = paramAnonymousView;
                      if (paramBoolean) {
                          paramAnonymousViewGroup = Utils.getText(2131165361);
                      }
                  }
                  paramAnonymousView = paramAnonymousViewGroup;
                  if (paramAnonymousInt == 8) {
                      paramAnonymousView = paramAnonymousViewGroup;
                      if (paramBoolean) {
                          paramAnonymousView = Utils.getText(2131165363);
                      }
                  }
                  this.txtStatus.append(Utils.getColoredText(paramAnonymousView, "#ff888888", "italic"));
                  return localView;
                  if ((paramAnonymousInt == 8) && (paramBoolean)) {
                      this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ffff0000", "bold"));
                  } else {
                      this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ff00ff00", "bold"));
                  }
              }
          }
      };
  }

From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java

public ArrayAdapter contextselpatchads(final boolean paramBoolean) {
      ArrayList localArrayList = new ArrayList();
      localArrayList.add(new Patterns(Utils.getText(2131165294), true));
      localArrayList.add(new Patterns(Utils.getText(2131165337), true));
      localArrayList.add(new Patterns(Utils.getText(2131165339), false));
      localArrayList.add(new Patterns(Utils.getText(2131165341), true));
      localArrayList.add(new Patterns(Utils.getText(2131165345), false));
      localArrayList.add(new Patterns(Utils.getText(2131165347), true));
      localArrayList.add(new Patterns(Utils.getText(2131165343), true));
      localArrayList.add(new Patterns(Utils.getText(2131165264), false));
      localArrayList.add(new Patterns(Utils.getText(2131165319), false));
      if (paramBoolean) {
          localArrayList.add(new Patterns(Utils.getText(2131165358), false));
      }/*from  w w w  .  j av a  2 s .  c  o m*/
      if (paramBoolean) {
          localArrayList.add(new Patterns(Utils.getText(2131165360), false));
      }
      if (paramBoolean) {
          localArrayList.add(new Patterns(Utils.getText(2131165362), false));
      }
      if ((all_d != null) && (all_d.adapter != null)) {
          all_d.adapter.notifyDataSetChanged();
      }
      new ArrayAdapter(getContext(), 2130968605, localArrayList) {
          TextView txtStatus;
          TextView txtTitle;

          public View getView(int paramAnonymousInt, View paramAnonymousView, ViewGroup paramAnonymousViewGroup) {
              paramAnonymousView = (Patterns) getItem(paramAnonymousInt);
              View localView = ((LayoutInflater) listAppsFragment.getInstance()
                      .getSystemService("layout_inflater")).inflate(2130968633, paramAnonymousViewGroup, false);
              this.txtTitle = ((TextView) localView.findViewById(2131558483));
              this.txtStatus = ((TextView) localView.findViewById(2131558484));
              this.txtTitle.setTextAppearance(getContext(), listAppsFragment.getSizeText());
              this.txtStatus.setTextAppearance(getContext(), listAppsFragment.getSizeText());
              paramAnonymousViewGroup = (CheckBox) localView.findViewById(2131558535);
              paramAnonymousViewGroup.setChecked(paramAnonymousView.Status);
              paramAnonymousViewGroup.setClickable(false);
              this.txtStatus.setTextAppearance(getContext(), 16973894);
              this.txtStatus.setTextColor(-7829368);
              this.txtTitle.setTextColor(-1);
              this.txtTitle.setText(((Patterns) getItem(paramAnonymousInt)).Name);
              this.txtTitle.setTypeface(null, 1);
              paramAnonymousView = ((Patterns) getItem(paramAnonymousInt)).Name;
              if ((paramAnonymousInt == 9) || (paramAnonymousInt == 10)) {
                  this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ffffff00", "bold"));
              }
              for (;;) {
                  if (paramAnonymousInt == 0) {
                      paramAnonymousView = Utils.getText(2131165295);
                  }
                  if (paramAnonymousInt == 1) {
                      paramAnonymousView = Utils.getText(2131165338);
                  }
                  if (paramAnonymousInt == 2) {
                      paramAnonymousView = Utils.getText(2131165340);
                  }
                  if (paramAnonymousInt == 3) {
                      paramAnonymousView = Utils.getText(2131165342);
                  }
                  if (paramAnonymousInt == 4) {
                      paramAnonymousView = Utils.getText(2131165346);
                  }
                  if (paramAnonymousInt == 5) {
                      paramAnonymousView = Utils.getText(2131165348);
                  }
                  if (paramAnonymousInt == 6) {
                      paramAnonymousView = Utils.getText(2131165344);
                  }
                  if (paramAnonymousInt == 7) {
                      paramAnonymousView = Utils.getText(2131165351);
                  }
                  if (paramAnonymousInt == 8) {
                      paramAnonymousView = Utils.getText(2131165320);
                  }
                  paramAnonymousViewGroup = paramAnonymousView;
                  if (paramBoolean) {
                      if (paramAnonymousInt == 9) {
                          paramAnonymousView = Utils.getText(2131165359);
                      }
                      if (paramAnonymousInt == 10) {
                          paramAnonymousView = Utils.getText(2131165361);
                      }
                      paramAnonymousViewGroup = paramAnonymousView;
                      if (paramAnonymousInt == 11) {
                          paramAnonymousViewGroup = Utils.getText(2131165363);
                      }
                  }
                  this.txtStatus.append(Utils.getColoredText(paramAnonymousViewGroup, "#ff888888", "italic"));
                  return localView;
                  if (paramAnonymousInt == 11) {
                      this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ffff0000", "bold"));
                  } else {
                      this.txtTitle.setText(Utils.getColoredText(paramAnonymousView, "#ff00ff00", "bold"));
                  }
              }
          }
      };
  }