Java tutorial
//package com.java2s; import android.annotation.SuppressLint; public class Main { @SuppressLint("DefaultLocale") private static String getViewName(String idName) { String[] strings = idName.split("_"); String viewName = strings[0]; for (int i = 1; i < strings.length; i++) { viewName = viewName + strings[i].substring(0, 1).toUpperCase() + strings[i].substring(1); } return viewName; } }