Code example for View

Methods: setOnClickListener

0
            mIcon = appInfo.loadIcon(pm);
        } 
    } 
 
    public void setOnClickHomeListener(View.OnClickListener listener) {
        mView.setOnClickListener(listener);
    } 
 
    private void createView(ViewGroup parent, TypedArray attributes) {
        mView = LayoutInflater.from(mContext).inflate(R.layout.leftnav_bar_home, parent, false);
    } 
 
    private void updateImage() { 
        boolean useIcon = mMode == Mode.ICON
                || mLogo == null
                || (mMode == Mode.BOTH && !mExpanded);
        ((ImageView) mView.findViewById(R.id.home)).setImageDrawable(useIcon ? mIcon : mLogo);
    } 
 
    View getView() {
        return mView;