set View Id - Android User Interface

Android examples for User Interface:View Id

Description

set View Id

Demo Code


//package com.java2s;

import android.support.annotation.LayoutRes;

import android.view.View;

public class Main {
    private static void setViewId(View view, @LayoutRes int id) {
        view.setId(id);//from ww w .  j a v  a  2 s  .  co  m
    }
}

Related Tutorials