當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。