Code example for TextView

Methods: setText, setId

0
 
        protected LinearLayout addIncludedView(int includedRootId, int stringResId) {
            LinearLayout container = new LinearLayout(this);
            container.setId(includedRootId);
 
            TextView textView = new TextView(this);
            container.addView(textView);
            textView.setId(R.id.text2);
            textView.setText(stringResId);
            return container;
        } 
    } 
 
    public static class ModuleA extends com.google.inject.AbstractModule { 
        @Override 
        protected void configure() { 
            requestStaticInjection(A.class); 
        } 
 
 
        public static class A {