java Android `求这两句的意思 tabLayout = (LinearLayout) this.findViewById(R.id.TabLayout);tabLayout.setBackgroundDrawable(this.getResources().getDrawable(R.drawable.tab01));

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 19:42:19

java Android `求这两句的意思 tabLayout = (LinearLayout) this.findViewById(R.id.TabLayout);tabLayout.setBackgroundDrawable(this.getResources().getDrawable(R.drawable.tab01));
java Android `求这两句的意思
tabLayout = (LinearLayout) this.findViewById(R.id.TabLayout);
tabLayout.setBackgroundDrawable(this.getResources().getDrawable(
R.drawable.tab01));

java Android `求这两句的意思 tabLayout = (LinearLayout) this.findViewById(R.id.TabLayout);tabLayout.setBackgroundDrawable(this.getResources().getDrawable(R.drawable.tab01));
tabLayout = (LinearLayout) this.findViewById(R.id.TabLayout);

这行代码就是根据视图的ID来获取控件对象.
你这行代码的话应该是你的布局文件中有个LinearLayout,它的android:id="@+id/TabLayout".
这样在Activity中通过Activity类的findViewById(R.id.TabLayout)获取次LinearLayout.

tabLayout.setBackgroundDrawable(this.getResources().getDrawable(
R.drawable.tab01));
这行代码就是设置你的布局的背景,就是一张图片.
图片是drawable目录下的tab01.

android的log中没有输出package mars.activity;import java.util.ArrayList;import java.util.HashMap;import android.app.Activity;import android.app.ListActivity;import android.os.Bundle;import android.view.View;import android.widget.ListView;import java Android `求这两句的意思 tabLayout = (LinearLayout) this.findViewById(R.id.TabLayout);tabLayout.setBackgroundDrawable(this.getResources().getDrawable(R.drawable.tab01)); android.os.HandlerThread与java.lang.Thread的区别在哪?(最好详细点) android只能用java开发应用程序吗,可不可以用C啊,若可以的话,如何搭建开发环境呢?我只做Android顶层的应用程序开发, java.lang.ClassCastException:android.widget.Button是什么错? QT平台上是否可以使用java语言开发android应用程序?QT for Android又是什么意思? android问题java.lang.ClassCastException:android.widget.ImageButton cannot be cast to android.wid软件生成跑出这句话:Caused by:java.lang.ClassCastException:android.widget.ImageButton cannot be cast to android.widget.ToggleButton在以下 android 的orientation是什么, android 的orientation是什么, Android的意思. 我做了一个android计算器,三角函数和根号要怎么实现啊,求代码,在eclipse里面编写的,一些直接JAVA的貌似用不了 andy the android的翻译 Android的所有翻译名字 Android 里的Intent是什么意思 robot和android的区别? 深度定制的android系统 android 除法运算保留两位小数3/2=1.50;用Java 怎么写出来? java.lang.ClassCastException:android.widget.ExpandableListViewExpandableListContextMenuInfo求高手解答这是什么错误,怎么解决