Java Code Examples for android.widget.RelativeLayout.getTag()

The following are Jave code examples for showing how to use getTag() 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: simple-upnp   File: FileBrowserAdapter.java   Source Code and License Vote up 7 votes
@Override
public void onClick(View view) {
    if (view.getId() != R.id.file_browser_list_item_button) {
        throw new IllegalStateException("Unhandled view in onClick: " + view.toString());
    }

    RelativeLayout parent = (RelativeLayout) view.getParent();
    ViewHolder holder = (ViewHolder) parent.getTag();
    ListItem listItem = getItem(holder.position);
    if (mListener != null && listItem != null) {
        mListener.playItems(listItem.getMediaItems());
    }
}