/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Activity theParent = getParent(); if ((!(theParent instanceof TabWidget)) && (android.os.Build.VERSION.SDK_INT < 11)) { // We have no enclosing TabWidget, so we need to request the custom title requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); } // Set the layout of the list activity if (Build.VERSION.SDK_INT < 11) setContentView(R.layout.tweet_list_layout); else setContentView(R.layout.tweet_list_layout_honeycomb); // Get the windows progress bar from the enclosing TabWidget if ((!(theParent instanceof TabWidget)) && (android.os.Build.VERSION.SDK_INT < 11)) { // We have no enclosing TabWidget, so we need our window here getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.window_title); progressBar = (ProgressBar) findViewById(R.id.title_progress_bar); titleTextBox = (TextView) findViewById(R.id.title_msg_box); ImageButton imageButton = (ImageButton) findViewById(R.id.back_button); imageButton.setVisibility(View.VISIBLE); } lv = getListView(); lv.setOnScrollListener(this); lv.setOnItemClickListener(this); lv.setOnItemLongClickListener(this); // Directly got to reply Bundle intentInfo = getIntent().getExtras(); if (intentInfo == null) { list_id = 0; } else { userListId = intentInfo.getInt("userListid"); list_id = intentInfo.getInt(TabWidget.LIST_ID); if (intentInfo.containsKey("userId")) { // Display tweets of a single user userId = intentInfo.getLong("userId"); // This is a one off list. So don't offer the reload button ImageButton tweet_list_reload_button = (ImageButton) findViewById(R.id.tweet_list_reload_button); if (tweet_list_reload_button != null) tweet_list_reload_button.setVisibility(View.INVISIBLE); } if (intentInfo.containsKey("unreadCount")) { unreadCount = intentInfo.getInt("unreadCount"); } } boolean fromDbOnly = tdb.getLastRead(account.getId(), list_id) != -1; fillListViewFromTimeline(fromDbOnly); // Only get tweets from db to speed things up at start }