Android 全息效果到编程生成的文本视图?

Android 全息效果到编程生成的文本视图?,android,textview,android-holo-everywhere,Android,Textview,Android Holo Everywhere,我正在以编程方式在线性布局上生成文本视图,我希望在触摸线性布局时显示以编程方式生成的带有全息效果的文本视图 for (int i = 1; i <= 10; i++) { LinearLayout linLayout= (LinearLayout) findViewById(R.id.sideIndex); TextView tv = new TextView(this); tv.setTextColor(getResources().getColor(R.color.whi

我正在以编程方式在线性布局上生成文本视图,我希望在触摸线性布局时显示以编程方式生成的带有全息效果的文本视图

for (int i = 1; i <= 10; i++)  {
  LinearLayout linLayout= (LinearLayout) findViewById(R.id.sideIndex);
  TextView tv = new TextView(this);
  tv.setTextColor(getResources().getColor(R.color.white));
// tmpTV.setTypeface(font);
  tv.setText(tmpLetter);
  tv.setGravity(Gravity.CENTER);
  tv.setTextSize(11); 
  tv.setTextColor(getResources().getColor(R.color.holo_green_light));

 LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT,
 LayoutParams.WRAP_CONTENT,2);

 tv.setLayoutParams(params);

 linLayout.addView(tv);
}

我想你应该设置全息背景选择器,这样你的文本视图就会响应select/pressed/onfocus状态。我不知道选择器在全息主题中的确切位置或命名方式,但应该是这样。

我想您应该设置全息背景选择器,以便您的文本视图响应select/pressed/onfocus状态。我不知道选择器在全息主题中的确切位置,也不知道它是如何命名的,但应该是这样。

活动的主题声明还不够吗?不是所有的小部件都继承了所有的主题属性吗?@RobertEstivill更新了这个问题!我对实用生成的东西有问题!主题宣言我已经做了!。。但对TextView没有影响!活动的主题声明还不够吗?不是所有的小部件都继承了所有的主题属性吗?@RobertEstivill更新了这个问题!我对实用生成的东西有问题!主题宣言我已经做了!。。但对TextView没有影响!
  linLayout.setOnTouchListener(new OnTouchListener()
    {
        public boolean onTouch(View v, MotionEvent event)
        {
           tv.setTextColor(getResources().getColor(R.color.holo_blue_bright));
            return false;
        }
    });