Search in sources :

Example 1 with Longpress

use of android.view.Longpress in project android_frameworks_base by ParanoidAndroid.

the class DisabledLongpressTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    final Longpress a = getActivity();
    mSimpleView = a.findViewById(R.id.simple_view);
    mSimpleView.setOnLongClickListener(new OnLongClickListener() {

        public boolean onLongClick(View v) {
            mLongClicked = true;
            return true;
        }
    });
    // The View#setOnLongClickListener will ensure the View is long
    // clickable, we reverse that here
    mSimpleView.setLongClickable(false);
}
Also used : Longpress(android.view.Longpress) OnLongClickListener(android.view.View.OnLongClickListener) View(android.view.View)

Example 2 with Longpress

use of android.view.Longpress in project platform_frameworks_base by android.

the class LongpressTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    final Longpress a = getActivity();
    mSimpleView = a.findViewById(R.id.simple_view);
    mSimpleView.setOnLongClickListener(new OnLongClickListener() {

        public boolean onLongClick(View v) {
            mLongClicked = true;
            return true;
        }
    });
}
Also used : Longpress(android.view.Longpress) OnLongClickListener(android.view.View.OnLongClickListener) View(android.view.View)

Example 3 with Longpress

use of android.view.Longpress in project platform_frameworks_base by android.

the class DisabledLongpressTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    final Longpress a = getActivity();
    mSimpleView = a.findViewById(R.id.simple_view);
    mSimpleView.setOnLongClickListener(new OnLongClickListener() {

        public boolean onLongClick(View v) {
            mLongClicked = true;
            return true;
        }
    });
    // The View#setOnLongClickListener will ensure the View is long
    // clickable, we reverse that here
    mSimpleView.setLongClickable(false);
}
Also used : Longpress(android.view.Longpress) OnLongClickListener(android.view.View.OnLongClickListener) View(android.view.View)

Example 4 with Longpress

use of android.view.Longpress in project android_frameworks_base by DirtyUnicorns.

the class LongpressTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    final Longpress a = getActivity();
    mSimpleView = a.findViewById(R.id.simple_view);
    mSimpleView.setOnLongClickListener(new OnLongClickListener() {

        public boolean onLongClick(View v) {
            mLongClicked = true;
            return true;
        }
    });
}
Also used : Longpress(android.view.Longpress) OnLongClickListener(android.view.View.OnLongClickListener) View(android.view.View)

Example 5 with Longpress

use of android.view.Longpress in project android_frameworks_base by DirtyUnicorns.

the class DisabledLongpressTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    final Longpress a = getActivity();
    mSimpleView = a.findViewById(R.id.simple_view);
    mSimpleView.setOnLongClickListener(new OnLongClickListener() {

        public boolean onLongClick(View v) {
            mLongClicked = true;
            return true;
        }
    });
    // The View#setOnLongClickListener will ensure the View is long
    // clickable, we reverse that here
    mSimpleView.setLongClickable(false);
}
Also used : Longpress(android.view.Longpress) OnLongClickListener(android.view.View.OnLongClickListener) View(android.view.View)

Aggregations

Longpress (android.view.Longpress)12 View (android.view.View)12 OnLongClickListener (android.view.View.OnLongClickListener)12