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:   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(;
    rightArrow = (ImageView) findViewById(;
    circleImageView = (CircleImageView) findViewById(;
    itemName = (TextView) findViewById(;
    detail = (TextView) findViewById(;
    redDot = (ImageView) findViewById(;


    button.setOnLongClickListener(new OnLongClickListener() {
        public boolean onLongClick(View view) {
            return true;