当前位置: 首页>>代码示例>>Java>>正文


Java ConstraintLayout.setOnClickListener方法代码示例

本文整理汇总了Java中android.support.constraint.ConstraintLayout.setOnClickListener方法的典型用法代码示例。如果您正苦于以下问题:Java ConstraintLayout.setOnClickListener方法的具体用法?Java ConstraintLayout.setOnClickListener怎么用?Java ConstraintLayout.setOnClickListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.constraint.ConstraintLayout的用法示例。


在下文中一共展示了ConstraintLayout.setOnClickListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reloadImages

import android.support.constraint.ConstraintLayout; //导入方法依赖的package包/类
private void reloadImages( final ConstraintLayout fab, final DatabaseReference ref, final String uid ) {
    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            ref.addValueEventListener(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot snapshot) {
                    clearPicList();

                    updatePicList( snapshot, uid );

                    gridAdapter.notifyDataSetChanged();
                    gridView.invalidateViews();
                    ref.removeEventListener(this);
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {
                    ref.removeEventListener(this);
                }
            });
        }
    });
}
 
开发者ID:chrisqz95,项目名称:couch-potatoes,代码行数:25,代码来源:PictureGridActivity.java

示例2: ViewHolderItem

import android.support.constraint.ConstraintLayout; //导入方法依赖的package包/类
public ViewHolderItem(View itemView) {
            super(itemView);

            itemView.setOnClickListener(this);

//            itemDescription = (TextView) itemView.findViewById(R.id.itemDescription);
            itemName = (TextView) itemView.findViewById(R.id.itemName);
            itemImage = (ImageView) itemView.findViewById(R.id.itemImage);
            priceRange = (TextView) itemView.findViewById(R.id.price_range);
            priceAverage = (TextView) itemView.findViewById(R.id.price_average);
            shopCount = (TextView) itemView.findViewById(R.id.shop_count);
            itemsListItem = (ConstraintLayout) itemView.findViewById(R.id.items_list_item);

            itemRating = (TextView) itemView.findViewById(R.id.item_rating);
            ratingCount = (TextView) itemView.findViewById(R.id.rating_count);

            itemsListItem.setOnClickListener(this);
            itemImage.setOnClickListener(this);
        }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-End-User-Android-app,代码行数:20,代码来源:AdapterNewCarts.java

示例3: ViewHolder

import android.support.constraint.ConstraintLayout; //导入方法依赖的package包/类
public ViewHolder(View itemView) {
            super(itemView);

            itemView.setOnClickListener(this);

//            itemDescription = (TextView) itemView.findViewById(R.id.itemDescription);
            itemName = (TextView) itemView.findViewById(R.id.itemName);
            itemImage = (ImageView) itemView.findViewById(R.id.itemImage);
            priceRange = (TextView) itemView.findViewById(R.id.price_range);
            priceAverage = (TextView) itemView.findViewById(R.id.price_average);
            shopCount = (TextView) itemView.findViewById(R.id.shop_count);
            itemsListItem = (ConstraintLayout) itemView.findViewById(R.id.items_list_item);

            itemRating = (TextView) itemView.findViewById(R.id.item_rating);
            ratingCount = (TextView) itemView.findViewById(R.id.rating_count);

            itemsListItem.setOnClickListener(this);
            itemImage.setOnClickListener(this);
        }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-End-User-Android-app,代码行数:20,代码来源:AdapterItemHorizontalScreen.java

示例4: FriendItemViewHolder

import android.support.constraint.ConstraintLayout; //导入方法依赖的package包/类
public FriendItemViewHolder(View itemView) {
    super(itemView);
    imgFriend = (ImageView) itemView.findViewById(R.id.imgGroup);
    container = (ConstraintLayout) itemView.findViewById(R.id.container);
    lblFriendName = (TextView) itemView.findViewById(R.id.lblGroupName);

    container.setOnClickListener(this);
}
 
开发者ID:orbismobile,项目名称:android-chat-namespace-socketio,代码行数:9,代码来源:GlobalFriendAdapter.java

示例5: onCreateView

import android.support.constraint.ConstraintLayout; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // The last two arguments ensure LayoutParams are inflated
    // properly.

    View rootView = inflater.inflate(R.layout.fragment_bread_pin, container, false);
    keyboard = (BRKeyboard) rootView.findViewById(R.id.brkeyboard);
    pinLayout = (LinearLayout) rootView.findViewById(R.id.pinLayout);

    if (BRKeyStore.getPinCode(getContext()).length() == 4) pinLimit = 4;

    title = (TextView) rootView.findViewById(R.id.title);
    message = (TextView) rootView.findViewById(R.id.message);
    dialogLayout = (RelativeLayout) rootView.findViewById(R.id.pin_dialog);
    mainLayout = (ConstraintLayout) rootView.findViewById(R.id.activity_pin);

    mainLayout.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            getActivity().getFragmentManager().beginTransaction().remove(FragmentPin.this).commit();
        }
    });

    dot1 = rootView.findViewById(R.id.dot1);
    dot2 = rootView.findViewById(R.id.dot2);
    dot3 = rootView.findViewById(R.id.dot3);
    dot4 = rootView.findViewById(R.id.dot4);
    dot5 = rootView.findViewById(R.id.dot5);
    dot6 = rootView.findViewById(R.id.dot6);

    keyboard.addOnInsertListener(new BRKeyboard.OnInsertListener() {
        @Override
        public void onClick(String key) {
            handleClick(key);
        }
    });
    keyboard.setShowDot(false);

    return rootView;
}
 
开发者ID:breadwallet,项目名称:breadwallet-android,代码行数:41,代码来源:FragmentPin.java


注:本文中的android.support.constraint.ConstraintLayout.setOnClickListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。