当前位置: 首页>>代码示例>>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;未经允许,请勿转载。