request View Focus - Android User Interface

Android examples for User Interface:View Click

Description

request View Focus

Demo Code


//package com.java2s;

import android.view.View;

public class Main {

    static public void requestFocus(View view) {
        view.setFocusable(true);/*from www . java2 s.  com*/
        view.setFocusableInTouchMode(true);
        view.requestFocus();
        view.requestFocusFromTouch();
    }
}

Related Tutorials