Code example for EditText

Methods: setLayoutParamssetOnKeyListenersetText

0
		eAlpha = new EditText(context);
		eAlpha.setLayoutParams(p2);
		eAlpha.setOnKeyListener(k);
		l2.addView(eAlpha);
 
		eRed = new EditText(context);
		eRed.setLayoutParams(p2);
		eRed.setOnKeyListener(k);
		l2.addView(eRed);
 
		eGreen = new EditText(context);
		eGreen.setLayoutParams(p2);
		eGreen.setOnKeyListener(k);
		l2.addView(eGreen);
 
		eBlue = new EditText(context);
		eBlue.setLayoutParams(p2);
		eBlue.setOnKeyListener(k);
		l2.addView(eBlue);
 
		eAlpha.setText(getAlpha());
		eRed.setText(getRed());
		eGreen.setText(getGreen());
		eBlue.setText(getBlue());
		updateColor(); 
 
		l.addView(l2);
 
		if (getTheme() != null) { 
			getTheme().applyOuter1(l);
			getTheme().applyNormal1(t);
			getTheme().applyNormal2(eAlpha);
			getTheme().applyNormal2(eBlue);
			getTheme().applyNormal2(eGreen);
			getTheme().applyNormal2(eRed);
		} 
 
		return l;
 
	}