@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); View view = new Banner(this); view.setOnClickListener(this); setContentView(view); Log.d(TAG_NAME, "Banner View activated successfully!"); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setActionBarTitle("库存报警"); setContentView(R.layout.container); PageListFragment frag = new PageListFragment("warning_product", R.layout.list_item_product); addContainerFragment(frag); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_contacts); findViewById(R.id.activity_contacts_add) .setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { showDetails(null); } }); listAdapter = new ContactRowAdapter(this, R.layout.contact_row, null, FROM, TO, 0); ListView listView = ((ListView) findViewById(R.id.activity_contacts_list)); listView.setAdapter(listAdapter); listView.setOnItemClickListener( new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> l, View v, int p, long id) { if (WebData.Object.inConflict(listAdapter.getCursor())) { resolveConflict(p); } else { showDetails(p); } } }); new SchemaManager( this, ContactContract.SCHEMA_ID, ((ContactsApplication) getApplication()).getUser(), this) .initSchema(); }
@Override public void onDestroy() { super.onDestroy(); System.gc(); }