當前位置: 首頁>>代碼示例>>Java>>正文


Java CardView.setPreventCornerOverlap方法代碼示例

本文整理匯總了Java中android.support.v7.widget.CardView.setPreventCornerOverlap方法的典型用法代碼示例。如果您正苦於以下問題:Java CardView.setPreventCornerOverlap方法的具體用法?Java CardView.setPreventCornerOverlap怎麽用?Java CardView.setPreventCornerOverlap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v7.widget.CardView的用法示例。


在下文中一共展示了CardView.setPreventCornerOverlap方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreateView

import android.support.v7.widget.CardView; //導入方法依賴的package包/類
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
        final Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.wallet_address_fragment, container, false);
    currentAddressQrView = (ImageView) view.findViewById(R.id.bitcoin_address_qr);

    final CardView currentAddressQrCardView = (CardView) view.findViewById(R.id.bitcoin_address_qr_card);
    currentAddressQrCardView.setCardBackgroundColor(Color.WHITE);
    currentAddressQrCardView.setPreventCornerOverlap(false);
    currentAddressQrCardView.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(final View v) {
            handleShowQRCode();
        }
    });

    return view;
}
 
開發者ID:guodroid,項目名稱:okwallet,代碼行數:19,代碼來源:WalletAddressFragment.java

示例2: onCreateViewHolder

import android.support.v7.widget.CardView; //導入方法依賴的package包/類
@Override
public RecyclerView.ViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType) {
    if (viewType == VIEW_TYPE_TRANSACTION) {
        if (useCards) {
            final CardView cardView = (CardView) inflater.inflate(R.layout.transaction_row_card, parent, false);
            cardView.setPreventCornerOverlap(false);
            cardView.setUseCompatPadding(true);
            return new TransactionViewHolder(cardView);
        } else {
            return new TransactionViewHolder(inflater.inflate(R.layout.transaction_row, parent, false));
        }
    } else if (viewType == VIEW_TYPE_WARNING) {
        return new WarningViewHolder(inflater.inflate(R.layout.transaction_row_warning, parent, false));
    } else {
        throw new IllegalStateException("unknown type: " + viewType);
    }
}
 
開發者ID:guodroid,項目名稱:okwallet,代碼行數:18,代碼來源:TransactionsAdapter.java

示例3: onCreateViewHolder

import android.support.v7.widget.CardView; //導入方法依賴的package包/類
@Override
public AttackHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_history_attack, parent, false);
    AttackHolder attackHolder = new AttackHolder(itemView);
    itemView.setOnClickListener(mOnClickListener);
    attackHolder.delete.setOnClickListener(mOnClickListener);
    attackHolder.delete.setOnLongClickListener(mOnLongClickListener);

    CardView cardView = (CardView) attackHolder.itemView.findViewById(R.id.card);
    cardView.setPreventCornerOverlap(false);

    return attackHolder;
}
 
開發者ID:monthlypub,項目名稱:SmingZZick_App,代碼行數:14,代碼來源:AttackAdaptor.java

示例4: initZoomRegionView

import android.support.v7.widget.CardView; //導入方法依賴的package包/類
/**
 * Init the ZoomRegionView for navigate into image when user zoom in
 */
private void initZoomRegionView() {
    if (mZoomRegionView == null) {

        Bitmap init = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
        mContentBitmap = init.copy(Bitmap.Config.ARGB_8888, true);
        init.recycle();
        mContentCanvas = new Canvas(mContentBitmap);

        FrameLayout.LayoutParams layoutParams = new LayoutParams(getWidth() / 4, getHeight() / 4,
                Gravity.TOP | Gravity.END);
        layoutParams.setMargins(12, 12, 12, 12);
        mZoomRegionCardView = new CardView(getContext());
        mZoomRegionCardView.setLayoutParams(layoutParams);
        mZoomRegionCardView.setPreventCornerOverlap(true);
        mZoomRegionCardView.setRadius(0f);
        mZoomRegionCardView.setUseCompatPadding(true);
        mZoomRegionCardView.setVisibility(View.INVISIBLE);

        CardView.LayoutParams childLayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT);
        mZoomRegionView = new ZoomRegionView(getContext());
        mZoomRegionView.setLayoutParams(childLayoutParams);
        mZoomRegionView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        mZoomRegionView.setOnZoomRegionListener(new ZoomRegionView.OnZoomRegionListener() {
            @Override
            public void onZoomRegionMoved(Rect newRect) {
                mFromZoomRegion = true;
                mZoomCenterX = newRect.centerX() * 4;
                mZoomCenterY = newRect.centerY() * 4;

                invalidate();
            }
        });

        mZoomRegionCardView.addView(mZoomRegionView);
        addView(mZoomRegionCardView);
    }
}
 
開發者ID:rosenpin,項目名稱:QuickDrawEverywhere,代碼行數:42,代碼來源:DrawView.java

示例5: onCreateView

import android.support.v7.widget.CardView; //導入方法依賴的package包/類
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
        final Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.request_coins_fragment, container, false);

    qrView = (ImageView) view.findViewById(R.id.request_coins_qr);

    final CardView qrCardView = (CardView) view.findViewById(R.id.request_coins_qr_card);
    qrCardView.setCardBackgroundColor(Color.WHITE);
    qrCardView.setPreventCornerOverlap(false);
    qrCardView.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(final View v) {
            BitmapFragment.show(getFragmentManager(), qrCodeBitmap.getBitmap());
        }
    });

    final CurrencyAmountView btcAmountView = (CurrencyAmountView) view.findViewById(R.id.request_coins_amount_btc);
    btcAmountView.setCurrencySymbol(config.getFormat().code());
    btcAmountView.setInputFormat(config.getMaxPrecisionFormat());
    btcAmountView.setHintFormat(config.getFormat());

    final CurrencyAmountView localAmountView = (CurrencyAmountView) view
            .findViewById(R.id.request_coins_amount_local);
    localAmountView.setInputFormat(Constants.LOCAL_FORMAT);
    localAmountView.setHintFormat(Constants.LOCAL_FORMAT);
    amountCalculatorLink = new CurrencyCalculatorLink(btcAmountView, localAmountView);

    acceptBluetoothPaymentView = (CheckBox) view.findViewById(R.id.request_coins_accept_bluetooth_payment);
    acceptBluetoothPaymentView.setVisibility(Bluetooth.canListen(bluetoothAdapter) ? View.VISIBLE : View.GONE);
    acceptBluetoothPaymentView.setChecked(Bluetooth.canListen(bluetoothAdapter) && bluetoothAdapter.isEnabled());
    acceptBluetoothPaymentView.setOnCheckedChangeListener(new OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
            if (Bluetooth.canListen(bluetoothAdapter) && isChecked) {
                if (bluetoothAdapter.isEnabled()) {
                    maybeStartBluetoothListening();
                } else {
                    // ask for permission to enable bluetooth
                    startActivityForResult(new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE),
                            REQUEST_CODE_ENABLE_BLUETOOTH);
                }
            } else {
                stopBluetoothListening();
            }

            updateView();
        }
    });

    initiateRequestView = (TextView) view.findViewById(R.id.request_coins_fragment_initiate_request);

    return view;
}
 
開發者ID:guodroid,項目名稱:okwallet,代碼行數:55,代碼來源:RequestCoinsFragment.java


注:本文中的android.support.v7.widget.CardView.setPreventCornerOverlap方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。