Example usage for android.view View GONE

List of usage examples for android.view View GONE

Introduction

In this page you can find the example usage for android.view View GONE.

Prototype

int GONE

To view the source code for android.view View GONE.

Click Source Link

Document

This view is invisible, and it doesn't take any space for layout purposes.

Usage

From source file:com.adarshahd.indianrailinfo.donate.TrainDetails.java

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_details);
    mActivity = this;
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    mDialog = new ProgressDialog(mActivity);
    mDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    mDialog.setIndeterminate(true);/* w  ww . ja v a 2s .c  o  m*/
    mDialog.show();
    mButtonAvailability = (Button) findViewById(R.id.id_btn_avail_next_7);
    if (savedInstanceState != null) {
        mDetails = savedInstanceState.getParcelable("LIST");
        if (mDetails == null) {
            return;
        }
        mFrameLayout = null;
        mFrameLayout = (FrameLayout) findViewById(R.id.id_fl_details);
        if (mDetails.getAction().equals(TrainEnquiry.FARE)) {
            getSupportActionBar().setTitle("Fare Details");
            mButtonAvailability.setVisibility(View.GONE);
            createTableLayoutTrainFare();
        }
        if (mDetails.getAction().equals(TrainEnquiry.AVAILABILITY)) {
            getSupportActionBar().setTitle("Availability Details");
            mButtonAvailability.setVisibility(View.VISIBLE);
            mButtonAvailability.setOnClickListener(this);
            createTableLayoutTrainAvailability();
        }
        return;
    }
    mFrameLayout = (FrameLayout) findViewById(R.id.id_fl_details);
    Intent intent = getIntent();
    mAction = intent.getStringExtra(TrainEnquiry.ACTION);
    if (mAction.equals(TrainEnquiry.FARE)) {
        getSupportActionBar().setTitle("Fare Details");
        mButtonAvailability.setVisibility(View.GONE);
        mTrainNumber = intent.getStringExtra(TrainEnquiry.TRAIN);
        mSrc = intent.getStringExtra(TrainEnquiry.SRC);
        mDst = intent.getStringExtra(TrainEnquiry.DST);
        mDay = intent.getStringExtra(TrainEnquiry.DAY_TRAVEL);
        mMonth = intent.getStringExtra(TrainEnquiry.MONTH_TRAVEL);
        mCls = intent.getStringExtra(TrainEnquiry.CLS);
        mAge = intent.getStringExtra(TrainEnquiry.AGE);
        new GetFare().execute();
        mDialog.setMessage("Fetching train fare . . .");
    }
    if (mAction.equals(TrainEnquiry.AVAILABILITY)) {
        getSupportActionBar().setTitle("Availability Details");
        mButtonAvailability.setVisibility(View.VISIBLE);
        mButtonAvailability.setOnClickListener(this);
        mTrainNumber = intent.getStringExtra(TrainEnquiry.TRAIN);
        mSrc = intent.getStringExtra(TrainEnquiry.SRC);
        mDst = intent.getStringExtra(TrainEnquiry.DST);
        mDay = intent.getStringExtra(TrainEnquiry.DAY_TRAVEL);
        mMonth = intent.getStringExtra(TrainEnquiry.MONTH_TRAVEL);
        mCls = intent.getStringExtra(TrainEnquiry.CLS);
        new GetAvail().execute();
        mDialog.setMessage("Fetching train availability . . .");
    }
}

From source file:com.bodeme.easycloud.syncadapter.EnterCredentialsFragment.java

@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
    getActivity().invalidateOptionsMenu();

    if (Constants.OWNCLOUD_URL == null) {
        String url = editURL.getText().toString();
        boolean isHttps = (url.length() >= 8 && url.substring(0, 8).equals("https://"));

        textHttpWarning.setVisibility(isHttps ? View.GONE : View.VISIBLE);
    }//from   w  w  w . j a  v a 2 s.c om
}

From source file:markson.visuals.sitapp.settingActivity.java

@SuppressWarnings("deprecation")
public void addnum(String crn) {
    crns[num] = crn;//w w w.  j  a  v  a  2s  .c o  m
    num++;
    full();
    Button myButton = new Button(this);
    myButton.setText(crn);
    LinearLayout layout = (LinearLayout) findViewById(R.id.crnlayout);
    myButton.setLayoutParams(new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,
            android.view.ViewGroup.LayoutParams.WRAP_CONTENT));
    myButton.setOnClickListener(new Button.OnClickListener() {
        public void onClick(View v) {
            Button b = (Button) v;
            String buttonText = b.getText().toString();
            rembut(buttonText);
            //v.setEnabled(false);
            v.setVisibility(View.GONE);

        }
    });
    layout.addView(myButton);

}

From source file:eu.sathra.SathraActivity.java

@Override
public void onDestroy() {
    super.onDestroy();

    if (mCurrentSathra == this) {
        mCurrentSathra = null;//from ww w.j  av  a2s. com
    }

    mSurfaceView.setVisibility(View.GONE);
}

From source file:com.appolis.receiving.AcReceiveOptionMove.java

/**
 * function to initial layout// ww w  . j  av  a  2s. c  o m
 */
private void initLayout() {
    linBack = (ImageView) findViewById(R.id.imgHome);
    linBack.setVisibility(View.GONE);
    linScan = (ImageView) findViewById(R.id.img_main_menu_scan_barcode);
    linScan.setOnClickListener(this);
    linScan.setVisibility(View.GONE);
    tvHeader = (TextView) findViewById(R.id.tvHeader);
    tvHeader.setText(
            languagePrefs.getPreferencesString(GlobalParams.RID_LBL_MOVE_KEY, GlobalParams.RID_LBL_MOVE_VALUE));

    tvMoveFunctionTitle = (TextView) findViewById(R.id.textView_move);
    tvMoveFunctionTitle.setText(languagePrefs.getPreferencesString(GlobalParams.MV_MSG_SELECTORSCAN_KEY,
            GlobalParams.MV_MSG_SELECTORSCAN_VALUE));
    tvTitleTransfer = (TextView) findViewById(R.id.tvTitleTransfer);
    tvTitleTransfer.setText(languagePrefs.getPreferencesString(GlobalParams.TRANSFER, GlobalParams.TRANSFER)
            + GlobalParams.VERTICAL_TWO_DOT);
    tvTitleMaxQty = (TextView) findViewById(R.id.tvTitleMaxQty);
    tvTitleMaxQty.setText(
            languagePrefs.getPreferencesString(GlobalParams.MV_LBL_MAXQTY, GlobalParams.DMG_LBL_MAXQTY_VALUE)
                    + ": ");
    tvUOM = (TextView) findViewById(R.id.tvUOM);
    tvUOM.setText(
            languagePrefs.getPreferencesString(GlobalParams.MV_LBL_UOM, GlobalParams.UNIT_OF_MEASURE_VALUE)
                    + GlobalParams.VERTICAL_TWO_DOT);
    tvLot = (TextView) findViewById(R.id.tvLot);
    tvLot.setText(languagePrefs.getPreferencesString(GlobalParams.REST_GRD_LOT_KEY, GlobalParams.LOT)
            + GlobalParams.VERTICAL_TWO_DOT);
    tvFrom = (TextView) findViewById(R.id.tvFrom);
    tvFrom.setText(languagePrefs.getPreferencesString(GlobalParams.MV_LBL_FROM, GlobalParams.FROM)
            + GlobalParams.VERTICAL_TWO_DOT);
    tvQtyView = (TextView) findViewById(R.id.tvQtyView);
    tvQtyView.setText(languagePrefs.getPreferencesString(GlobalParams.RID_GRD_QTY_KEY, GlobalParams.QTY));
    tvTo = (TextView) findViewById(R.id.tvTo);
    tvTo.setText(languagePrefs.getPreferencesString(GlobalParams.MV_LBL_TO, GlobalParams.TO)
            + GlobalParams.VERTICAL_TWO_DOT);

    tvmaxQty = (TextView) findViewById(R.id.tvmaxQty);
    tvItemDescription = (TextView) findViewById(R.id.tvItemDescription);
    tvTransfer = (TextView) findViewById(R.id.tvTransfer);
    spnMoveUOM = (Spinner) findViewById(R.id.spn_Move_UOM);
    edtLotValue = (EditText) findViewById(R.id.edtLotValue);
    edtMoveFrom = (EditText) findViewById(R.id.edt_move_from);

    edtMoveQty = (EditText) findViewById(R.id.et_move_qty);
    edtMoveQty.addTextChangedListener(new TextWatcher() {
        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            if (null != s && s.length() == 1 && s.toString().equalsIgnoreCase(".")) {
                edtMoveQty.setText("");
                s = "";
            }
        }

        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }

        @Override
        public void afterTextChanged(Editable s) {
        }
    });
    edtMoveQty.setFilters(
            new InputFilter[] { new DecimalDigitsInputFilter(enPurchaseOrderItemInfo.get_significantDigits()),
                    new InputFilter.LengthFilter(14) });

    edtMoveTo = (EditText) findViewById(R.id.et_move_to);
    btMoveOk = (Button) findViewById(R.id.btnOK);
    btMoveOk.setText(languagePrefs.getPreferencesString(GlobalParams.OK, GlobalParams.OK));
    btMoveOk.setOnClickListener(this);
    btMoveOk.setEnabled(true);
    btMoveCancel = (Button) findViewById(R.id.btnCancel);
    btMoveCancel.setText(languagePrefs.getPreferencesString(GlobalParams.CANCEL, GlobalParams.CANCEL));
    btMoveCancel.setOnClickListener(this);

    edtMoveTo.setOnFocusChangeListener(new OnFocusChangeListener() {

        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            if (hasFocus) {
                linScan.setVisibility(View.VISIBLE);
                scanFlag = GlobalParams.FLAG_ACTIVE;
            } else {
                linScan.setVisibility(View.GONE);
                scanFlag = GlobalParams.FLAG_INACTIVE;
            }
        }
    });

    if (null != enPurchaseOrderItemInfo) {
        tvTransfer.setText(enPurchaseOrderItemInfo.get_itemNumber());
        tvItemDescription.setText(enPurchaseOrderItemInfo.get_itemDesc());
    }

    if (null != enPurchaseOrderInfo) {
        if (StringUtils.isNotBlank(enPurchaseOrderInfo.get_receivingBinNumber())) {
            edtMoveFrom.setText(enPurchaseOrderInfo.get_receivingBinNumber());
        } else {
            edtMoveFrom.setText("");
        }
        edtMoveFrom.setEnabled(false);
    }

    if (null != listReceiptInfos) {
        if (listReceiptInfos.size() == 1) {
            Log.e("Appolis", "single record was selected from the previous screen");
            EnPurchaseOrderReceiptInfo recipt = listReceiptInfos.get(0);
            maxQty = recipt.get_quantityReceived();
            tvmaxQty.setText(BuManagement.formatDecimal(recipt.get_quantityReceived()).trim());
            edtLotValue.setText(recipt.get_lotNumber());
            edtLotValue.setEnabled(false);
            edtMoveQty.setText(BuManagement.formatDecimal(recipt.get_quantityReceived()).trim());
            edtMoveQty.setEnabled(true);
            spnMoveUOM.setEnabled(true);
            edtMoveTo.requestFocus();

            GetDataAsyncTask getDataAsyncTask = new GetDataAsyncTask(this,
                    enPurchaseOrderItemInfo.get_itemNumber());
            getDataAsyncTask.execute();
        } else {
            Logger.error("Appolis: multiple records have been selected on the previous screen");
            String strlot = "";
            int index = 0;

            for (EnPurchaseOrderReceiptInfo item : listReceiptInfos) {
                maxQty += item.get_quantityReceived();

                if (StringUtils.isNotBlank(item.get_lotNumber())) {
                    if (index == 0) {
                        strlot = strlot + item.get_lotNumber();
                    } else {
                        strlot = strlot + ", " + item.get_lotNumber();
                    }
                    index++;
                }
            }

            tvmaxQty.setText(BuManagement.formatDecimal(maxQty).trim());
            edtMoveTo.requestFocus();
            edtLotValue.setText(strlot);
            edtLotValue.setEnabled(false);
            edtMoveQty.setText(BuManagement.formatDecimal(maxQty).trim());
            edtMoveQty.setEnabled(false);
            spnMoveUOM.setEnabled(false);
            uom = enPurchaseOrderItemInfo.get_uomDesc();
            ArrayList<String> listUom = new ArrayList<String>();
            listUom.add(uom);
            ArrayAdapter<String> uomAdapter = new ArrayAdapter<String>(this, R.layout.custom_spinner_item,
                    listUom);
            spnMoveUOM.setAdapter(uomAdapter);
        }
    }
}

From source file:com.andrewshu.android.reddit.common.Common.java

public static void updateNextPreviousButtons(ListActivity act, View nextPreviousView, String after,
        String before, int count, RedditSettings settings, OnClickListener downloadAfterOnClickListener,
        OnClickListener downloadBeforeOnClickListener) {
    boolean shouldShow = after != null || before != null;
    Button nextButton = null;/*from  ww w .  java 2 s. com*/
    Button previousButton = null;

    // If alwaysShowNextPrevious, use the navbar
    if (settings.isAlwaysShowNextPrevious()) {
        nextPreviousView = act.findViewById(R.id.next_previous_layout);
        if (nextPreviousView == null)
            return;
        View nextPreviousBorder = act.findViewById(R.id.next_previous_border_top);

        if (shouldShow) {
            if (nextPreviousView != null && nextPreviousBorder != null) {
                if (Util.isLightTheme(settings.getTheme())) {
                    nextPreviousView.setBackgroundResource(android.R.color.background_light);
                    nextPreviousBorder.setBackgroundResource(R.color.black);
                } else {
                    nextPreviousBorder.setBackgroundResource(R.color.white);
                }
                nextPreviousView.setVisibility(View.VISIBLE);
            }
            // update the "next 25" and "prev 25" buttons
            nextButton = (Button) act.findViewById(R.id.next_button);
            previousButton = (Button) act.findViewById(R.id.previous_button);
        } else {
            nextPreviousView.setVisibility(View.GONE);
        }
    }
    // Otherwise we are using the ListView footer
    else {
        if (nextPreviousView == null)
            return;
        if (shouldShow && nextPreviousView.getVisibility() != View.VISIBLE) {
            nextPreviousView.setVisibility(View.VISIBLE);
        } else if (!shouldShow && nextPreviousView.getVisibility() == View.VISIBLE) {
            nextPreviousView.setVisibility(View.GONE);
        }
        // update the "next 25" and "prev 25" buttons
        nextButton = (Button) nextPreviousView.findViewById(R.id.next_button);
        previousButton = (Button) nextPreviousView.findViewById(R.id.previous_button);
    }
    if (nextButton != null) {
        if (after != null) {
            nextButton.setVisibility(View.VISIBLE);
            nextButton.setOnClickListener(downloadAfterOnClickListener);
        } else {
            nextButton.setVisibility(View.INVISIBLE);
        }
    }
    if (previousButton != null) {
        if (before != null && count != Constants.DEFAULT_THREAD_DOWNLOAD_LIMIT) {
            previousButton.setVisibility(View.VISIBLE);
            previousButton.setOnClickListener(downloadBeforeOnClickListener);
        } else {
            previousButton.setVisibility(View.INVISIBLE);
        }
    }
}

From source file:app.hacked.ScheduleListFragment.java

private void getData() {
    if (null != progressBar)
        progressBar.setVisibility(View.VISIBLE);

    HackedIOSchedule = new ArrayList<ScheduleItem>();

    String url = "http://hackedioapp.networksaremadeofstring.co.uk/schedule.php";

    JsonObjectRequest jsObjRequest = new JsonObjectRequest(Request.Method.GET, url, null,
            new Response.Listener<JSONObject>() {
                @Override/*  w w  w . j a  va  2s  . com*/
                public void onResponse(JSONObject response) {
                    /*txtDisplay.setText("Response => "+response.toString());
                    findViewById(R.id.progressBar1).setVisibility(View.GONE);*/
                    try {
                        if (response.has("success") && response.getBoolean("success")
                                && response.has("schedule")) {
                            JSONObject schedule = response.getJSONObject("schedule");
                            int size = schedule.length() + 1;
                            for (int i = 1; i < size; i++) {
                                JSONObject schedItem = schedule.getJSONObject(Integer.toString(i));

                                HackedIOSchedule.add(new ScheduleItem(Integer.toString(i),
                                        schedItem.getString("scheduleTitle"),
                                        schedItem.getString("scheduleStartTime"),
                                        schedItem.getString("scheduleEndTime"),
                                        schedItem.getString("scheduleDesc"), schedItem.getString("isDayTitle"),
                                        schedItem.getString("scheduleFullDataHTML")));
                            }

                            adapter = new ScheduleListAdapter(getActivity(), HackedIOSchedule);

                            if (null != progressBar)
                                progressBar.setVisibility(View.GONE);

                            setListAdapter(adapter);
                        } else {
                            Toast.makeText(getActivity(), "An Error Was encountered", Toast.LENGTH_SHORT)
                                    .show();
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                        Toast.makeText(getActivity(), "An Error Was encountered", Toast.LENGTH_SHORT).show();
                    }

                }
            }, new Response.ErrorListener() {

                @Override
                public void onErrorResponse(VolleyError error) {
                    // TODO Auto-generated method stub
                    Toast.makeText(getActivity(), "An Error Was encountered", Toast.LENGTH_SHORT).show();
                }
            });

    queue.add(jsObjRequest);
}

From source file:com.odoo.addons.sale.SalesDetail.java

private void init() {
    mForm = (OForm) findViewById(R.id.saleForm);
    mForm.setEditable(true);// ww  w. j a v  a2 s . c o  m
    txvType = (TextView) findViewById(R.id.txvType);
    currency1 = (TextView) findViewById(R.id.currency1);
    currency2 = (TextView) findViewById(R.id.currency2);
    currency3 = (TextView) findViewById(R.id.currency3);
    String currencySymbol = currencyObj.getString("symbol");
    untaxedAmt = (TextView) findViewById(R.id.untaxedTotal);
    taxesAmt = (TextView) findViewById(R.id.taxesTotal);
    total_amt = (TextView) findViewById(R.id.fTotal);
    untaxedAmt.setText("0.00");
    taxesAmt.setText("0.00");
    total_amt.setText("0.00");
    layoutAddItem = (LinearLayout) findViewById(R.id.layoutAddItem);
    layoutAddItem.setOnClickListener(this);
    if (extra == null || !extra.containsKey(OColumn.ROW_ID)) {
        mForm.initForm(null);
        actionBar.setTitle(R.string.label_new);
        actionBar.setHomeAsUpIndicator(R.drawable.ic_action_navigation_close);
        txvType.setText(R.string.label_quotation);
    } else {
        record = sale.browse(extra.getInt(OColumn.ROW_ID));
        if (record == null) {
            finish();
        }
        if (!record.getString("partner_id").equals("false") && mType == Type.Quotation) {
            OnCustomerChangeUpdate onCustomerChangeUpdate = new OnCustomerChangeUpdate();
            onCustomerChangeUpdate.execute(record.getM2ORecord("partner_id").browse());
        }
        if (mType == Type.Quotation) {
            actionBar.setTitle(R.string.label_quotation);
            txvType.setText(R.string.label_quotation);
            if (record.getString("state").equals("cancel"))
                layoutAddItem.setVisibility(View.GONE);
        } else {
            layoutAddItem.setVisibility(View.GONE);
            actionBar.setTitle(R.string.label_sale_orders);
            txvType.setText(R.string.label_sale_orders);
            mForm.setEditable(false);
        }
        currencySymbol = record.getM2ORecord("currency_id").browse().getString("symbol");
        untaxedAmt.setText(String.format("%.2f", record.getFloat("amount_untaxed")));
        taxesAmt.setText(String.format("%.2f", record.getFloat("amount_tax")));
        total_amt.setText(String.format("%.2f", record.getFloat("amount_total")));
        mForm.initForm(record);
    }
    mSOType = txvType.getText().toString();
    currency1.setText(currencySymbol);
    currency2.setText(currencySymbol);
    currency3.setText(currencySymbol);
}

From source file:fr.bmartel.android.flowerpower.FlowerPowerActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_flower_power);

    // Use this check to determine whether BLE is supported on the device. Then
    // you can selectively disable BLE-related features.
    if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
        Toast.makeText(this, "Bluetooth Smart is not supported on your device", Toast.LENGTH_SHORT).show();
        finish();//from ww  w .  j av a 2  s  .c om
    }

    mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();

    if (!mBluetoothAdapter.isEnabled()) {
        Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
        startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
    }

    final ProgressBar progress_bar = (ProgressBar) findViewById(R.id.scanningProgress);

    if (progress_bar != null)
        progress_bar.setEnabled(false);

    final Button button_stop_scanning = (Button) findViewById(R.id.stop_scanning_button);

    if (button_stop_scanning != null)
        button_stop_scanning.setEnabled(false);

    final TextView scanText = (TextView) findViewById(R.id.scanText);

    if (scanText != null)
        scanText.setText("");

    registerReceiver(mGattUpdateReceiver, makeGattUpdateIntentFilter());

    button_stop_scanning.setEnabled(false);

    final Button button_find_accessory = (Button) findViewById(R.id.scanning_button);

    button_stop_scanning.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (currentService.isScanning()) {
                currentService.stopScan();

                if (progress_bar != null) {
                    progress_bar.setEnabled(false);
                    progress_bar.setVisibility(View.GONE);
                }

                if (scanText != null)
                    scanText.setText("");

                if (button_stop_scanning != null)
                    button_stop_scanning.setEnabled(false);
            }
        }
    });

    button_find_accessory.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            triggerNewScan();
        }
    });

    if (mBluetoothAdapter.isEnabled()) {

        Intent intent = new Intent(this, FlowerPowerBtService.class);
        // bind the service to current activity and create it if it didnt exist before
        startService(intent);
        bound = bindService(intent, mServiceConnection, BIND_AUTO_CREATE);
    }
}

From source file:co.nerdart.ourss.activity.EditFeedActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    UiUtils.setPreferenceTheme(this);
    super.onCreate(savedInstanceState);

    ActionBar actionBar = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);

    setContentView(R.layout.feed_edit);/*ww w.j a  v a2s  .c o m*/
    setResult(RESULT_CANCELED);

    Intent intent = getIntent();

    mNameEditText = (EditText) findViewById(R.id.feed_title);
    mUrlEditText = (EditText) findViewById(R.id.feed_url);
    mRetrieveFulltextCb = (CheckBox) findViewById(R.id.retrieve_fulltext);
    mFiltersListView = (ListView) findViewById(android.R.id.list);
    View filtersLayout = findViewById(R.id.filters_layout);
    View buttonLayout = findViewById(R.id.button_layout);

    if (intent.getAction().equals(Intent.ACTION_INSERT) || intent.getAction().equals(Intent.ACTION_SEND)) {
        setTitle(R.string.new_feed_title);

        filtersLayout.setVisibility(View.GONE);

        if (intent.hasExtra(Intent.EXTRA_TEXT)) {
            mUrlEditText.setText(intent.getStringExtra(Intent.EXTRA_TEXT));
        }

        restoreInstanceState(savedInstanceState);
    } else if (intent.getAction().equals(Intent.ACTION_EDIT)) {
        setTitle(R.string.edit_feed_title);

        buttonLayout.setVisibility(View.GONE);

        mFiltersCursorAdapter = new FiltersCursorAdapter(this, null);
        mFiltersListView.setAdapter(mFiltersCursorAdapter);
        mFiltersListView.setOnItemLongClickListener(new OnItemLongClickListener() {
            @Override
            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
                startActionMode(mFilterActionModeCallback);
                mFiltersCursorAdapter.setSelectedFilter(position);
                mFiltersListView.invalidateViews();
                return true;
            }
        });

        getLoaderManager().initLoader(0, null, this);

        if (!restoreInstanceState(savedInstanceState)) {
            Cursor cursor = getContentResolver().query(intent.getData(), FEED_PROJECTION, null, null, null);

            if (cursor.moveToNext()) {
                mPreviousName = cursor.getString(0);
                mNameEditText.setText(mPreviousName);
                mUrlEditText.setText(cursor.getString(1));
                mRetrieveFulltextCb.setChecked(cursor.getInt(2) == 1);
                cursor.close();
            } else {
                cursor.close();
                Crouton.makeText(EditFeedActivity.this, R.string.error, Style.INFO);
                finish();
            }
        }
    }
}