Java Code Examples for android.widget.RelativeLayout.setLongClickable()

The following are Jave code examples for showing how to use setLongClickable() of the android.widget.RelativeLayout class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: DaiGo   File: ComplexButton.java   Source Code and License Vote up 6 votes
public ComplexButton(Context context, @Nullable AttributeSet attrs) {
    super(context, attrs);
    LayoutInflater.from(context).inflate(R.layout.complex_button, this);

    button = (RelativeLayout) findViewById(R.id.complex_button_body);
    rightArrow = (ImageView) findViewById(R.id.complex_button_item_right_arrow);
    circleImageView = (CircleImageView) findViewById(R.id.complex_button_item_image);
    itemName = (TextView) findViewById(R.id.complex_button_item_name);
    detail = (TextView) findViewById(R.id.complex_button_item_detail);
    redDot = (ImageView) findViewById(R.id.complex_button_red_dot);

    redDot.setVisibility(GONE);

    setButtonClickable(true);
    button.setLongClickable(true);
    button.setOnLongClickListener(new OnLongClickListener() {
        @Override
        public boolean onLongClick(View view) {
            return true;
        }
    });

    selectType(TYPE_IMAGE_ROUND);
}