Example usage for android.widget TableRow indexOfChild

List of usage examples for android.widget TableRow indexOfChild

Introduction

In this page you can find the example usage for android.widget TableRow indexOfChild.

Prototype

public int indexOfChild(View child) 

Source Link

Document

Returns the position in the group of the specified child view.

Usage

From source file:de.tobiasbielefeld.solitaire.ui.manual.ManualGames.java

@Override
public void onClick(View v) {
    //get index of the button as seen from the container
    TableRow row = (TableRow) v.getParent();
    TableLayout table = (TableLayout) row.getParent();
    int index = table.indexOfChild(row) * COLUMNS + row.indexOfChild(v);

    loadGameText(index);/*w w w.j  av  a 2  s.c  o  m*/
}