代码片段:
public class home extends TabActivity implements OnTabChangeListener{
private static final String HOME_SPEC = "";
private static final String PROFILE_SPEC = "";
private static final String NEWPOST_SPEC = "";
private static final String SETTINGS_SPEC = "";
private TabHost tabHost;
private TextView header;
int s,c;
private Typeface tf;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.home);
tabHost = getTabHost();
TabSpec newpostSpec = tabHost.newTabSpec(NEWPOST_SPEC);
newpostSpec.setIndicator(NEWPOST_SPEC, getResources().getDrawable(R.drawable.icon_post_tab));
Intent newpostIntent = new Intent(home.this,NewPostActivity.class);
newpostSpec.setContent(newpostIntent);
tabHost.addTab(loginSpec);
tabHost.addTab(newpostSpec);
tabHost.setOnTabChangedListener(this);
for(int i=0;i<tabHost.getTabWidget().getChildCount();i++)
{
tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.TRANSPARENT);
}
}
@Override
public void onTabChanged(String tabId) {
// TODO Auto-generated method stub
for(int i=0;i<tabHost.getTabWidget().getChildCount();i++)
{
tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.TRANSPARENT);
}
tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab()).setBackgroundColor(Color.TRANSPARENT);
}
}
上面我用于 TabActivity 的代码。现在在 NewPostActivity 我只有一个编辑文本,当我单击 Edittext 时,键盘似乎没有写入该编辑文本。那么键盘的外观应该怎么做呢?请回复....