/** {@inheritDoc} */ @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); final Intent i = this.getIntent(); Log.d(TAG, "got intent: " + i.getAction()); Log.d(TAG, "got uri: " + i.getData()); Log.d(TAG, "got extra: " + i.getExtras()); this.setTheme(PreferencesActivity.getTheme(this)); Utils.setLocale(this); this.setContentView(R.layout.conversationlist); ChangelogHelper.showChangelog(this, true); final List<ResolveInfo> ri = this.getPackageManager() .queryBroadcastReceivers(new Intent("de.ub0r.android.websms.connector.INFO"), 0); if (ri.size() == 0) { final Intent intent = Market.getInstallAppIntent(this, "de.ub0r.android.websms", Market.ALT_WEBSMS); ChangelogHelper.showNotes(this, true, "get WebSMS", null, intent); } else { ChangelogHelper.showNotes(this, true, null, null, null); } showRows(this); final ListView list = this.getListView(); this.adapter = new ConversationAdapter(this); this.setListAdapter(this.adapter); list.setOnItemClickListener(this); list.setOnItemLongClickListener(this); this.longItemClickDialog = new String[WHICH_N]; this.longItemClickDialog[WHICH_ANSWER] = this.getString(R.string.reply); this.longItemClickDialog[WHICH_CALL] = this.getString(R.string.call); this.longItemClickDialog[WHICH_VIEW_CONTACT] = this.getString(R.string.view_contact_); this.longItemClickDialog[WHICH_VIEW] = this.getString(R.string.view_thread_); this.longItemClickDialog[WHICH_DELETE] = this.getString(R.string.delete_thread_); this.longItemClickDialog[WHICH_MARK_SPAM] = this.getString(R.string.filter_spam_); }
/** {@inheritDoc} */ @Override public void onCreate(final Bundle savedInstanceState) { this.setTheme(PreferencesActivity.getTheme(this)); super.onCreate(savedInstanceState); Log.d(TAG, "onCreate();"); final Bundle extras = this.getIntent().getExtras(); if (extras == null) { this.finish(); return; } this.connector = new ConnectorSpec(this.getIntent()); if (this.connector == null) { this.finish(); return; } this.setContentView(R.layout.captcha); this.setTitle(this.connector.getName() + " - " + this.getString(R.string.captcha_)); this.getSupportActionBar().setHomeButtonEnabled(true); WebSMSApp.fixActionBarBackground( this.getSupportActionBar(), this.getResources(), R.drawable.bg_striped, R.drawable.bg_striped_img); final Parcelable p = extras.getParcelable(Connector.EXTRA_CAPTCHA_DRAWABLE); if (p != null && p instanceof Bitmap) { ((ImageView) this.findViewById(R.id.captcha)).setImageBitmap((Bitmap) p); } else { this.finish(); return; } final String t = extras.getString(Connector.EXTRA_CAPTCHA_MESSAGE); if (t != null) { ((TextView) this.findViewById(R.id.text)).setText(t); } this.findViewById(R.id.ok).setOnClickListener(this); this.findViewById(R.id.cancel).setOnClickListener(this); }