class CardInputWidget extends LinearLayout {

    @VisibleForTesting
    @Nullable
    StripeEditText getFocusRequestOnTouch(int touchX) {
        int frameStart = mFrameLayout.getLeft();

        if (mCardNumberIsViewed) {
            // Then our view is
            // |CARDVIEW||space||DATEVIEW|

            if (touchX < frameStart + mPlacementParameters.cardWidth) {
                // Then the card edit view will already handle this touch.
                return null;
            } else if (touchX < mPlacementParameters.cardTouchBufferLimit){
                // Then we want to act like this was a touch on the card view
                return mCardNumberEditText;
            } else if (touchX < mPlacementParameters.dateStartPosition) {
                // Then we act like this was a touch on the date editor.
                return mExpiryDateEditText;
            } else {
                // Then the date editor will already handle this touch.
                return null;
            }
        } else {
            // Our view is
            // |PEEK||space||DATE||space||CVC|
            if (touchX < frameStart + mPlacementParameters.peekCardWidth) {
                // This was a touch on the card number editor, so we don't need to handle it.
                return null;
            } else if( touchX < mPlacementParameters.cardTouchBufferLimit) {
                // Then we need to act like the user touched the card editor
                return mCardNumberEditText;
            } else if (touchX < mPlacementParameters.dateStartPosition) {
                // Then we need to act like this was a touch on the date editor
                return mExpiryDateEditText;
            } else if (touchX < mPlacementParameters.dateStartPosition + mPlacementParameters.dateWidth) {
                // Just a regular touch on the date editor.
                return null;
            } else if (touchX < mPlacementParameters.dateRightTouchBufferLimit) {
                // We need to act like this was a touch on the date editor
                return mExpiryDateEditText;
            } else if (touchX < mPlacementParameters.cvcStartPosition) {
                // We need to act like this was a touch on the cvc editor.
                return mCvcNumberEditText;
            } else {
                return null;
            }
        }
    }

    public  CardInputWidget(Context context);
    public  CardInputWidget(Context context, AttributeSet attrs);
    public  CardInputWidget(Context context, AttributeSet attrs, int defStyleAttr);

}