0
我有以下代码为什么这个活动没有显示我的布局?
@SuppressLint("NewApi")
公共类Happy_HourActivity延伸SherlockActivity {
private ListView listaHP;
private Bundle bundle;
private List<HappyHourModel> listaHpModelResponse;
private HappyHourAdapter adapterHappyHour;
public void OnCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_happy__hour);
setTheme(R.style.Theme_Sherlock_Light_DarkActionBar);
setSupportProgressBarIndeterminateVisibility(true);
getSupportActionBar().setTitle("Happy Hour");
listaHP = (ListView)findViewById(R.id.list_happy);
bundle = getIntent().getExtras();
并从称为一个活动被称为 “descriptionActivity” 如下。
case R.id.happy:
intent = new Intent(DescriptionActivity.this, Happy_HourActivity.class);
intent.putExtra("_id", _bundle.getString("_id"));
intent.putExtra("_name", _bundle.getString("_name"));
startActivity(intent);
break;
布局:
但这是表明
你没有填充你的ListView。它是空的。 – Ahmad
@Raghunandan它在'OnCreate()'(注意方法的拼写):) – codeMagic
@codeMagic我注意到拼写因此我评论,但我没有注意到setContentView。在 – Raghunandan