Search in sources :

Example 1 with BaseInflaterAdapter

use of com.secupwn.aimsicd.adapters.BaseInflaterAdapter in project Android-IMSI-Catcher-Detector by CellularPrivacy.

the class CellInfoFragment method updateStockNeighboringCells.

void updateStockNeighboringCells() {
    mNeighboringTotal.setText(String.valueOf(neighboringCells.size()));
    if (neighboringCells.size() != 0) {
        BaseInflaterAdapter<CardItemData> adapter = new BaseInflaterAdapter<>(new CellCardInflater());
        int i = 1;
        int total = neighboringCells.size();
        for (Cell cell : neighboringCells) {
            CardItemData data = new CardItemData(cell, i++ + " / " + total);
            adapter.addItem(data, false);
        }
        lv.setAdapter(adapter);
        mNeighboringCells.setVisibility(View.GONE);
        mNeighboringTotalView.setVisibility(View.VISIBLE);
    }
}
Also used : CellCardInflater(com.secupwn.aimsicd.adapters.CellCardInflater) CardItemData(com.secupwn.aimsicd.adapters.CardItemData) Cell(com.secupwn.aimsicd.utils.Cell) BaseInflaterAdapter(com.secupwn.aimsicd.adapters.BaseInflaterAdapter)

Aggregations

BaseInflaterAdapter (com.secupwn.aimsicd.adapters.BaseInflaterAdapter)1 CardItemData (com.secupwn.aimsicd.adapters.CardItemData)1 CellCardInflater (com.secupwn.aimsicd.adapters.CellCardInflater)1 Cell (com.secupwn.aimsicd.utils.Cell)1