Example usage for android.widget RelativeLayout setSelected

List of usage examples for android.widget RelativeLayout setSelected

Introduction

In this page you can find the example usage for android.widget RelativeLayout setSelected.

Prototype

public void setSelected(boolean selected) 

Source Link

Document

Changes the selection state of this view.

Usage

From source file:com.example.mapdemo.BasicMapDemoActivity.java

private void setSelected(RelativeLayout rl) {

    // reset all selections
    rlProfile.setSelected(false);//  w  w w .j a  v  a 2  s  .c o m
    rlHome.setSelected(false);
    rlUploads.setSelected(false);
    rlSubscriptions.setSelected(false);
    rlPlaylists.setSelected(false);
    rlHistory.setSelected(false);
    rlFav.setSelected(false);

    rl.setSelected(true); // set current selection

}