Search in sources :

Example 1 with ViewTableNameSpinnerHolder

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

the class DbViewerSpinnerAdapter method getView.

@Override
public View getView(int pPosition, View pConvertView, ViewGroup pParent) {
    View lView = pConvertView;
    ViewTableNameSpinnerHolder lHolder;
    if (lView == null || (lView.getId() != R.id.item_root_layout && !(lView.getTag() instanceof ViewTableNameSpinnerHolder))) {
        lView = ((LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.item_spinner_db_viewer, pParent, false);
        lHolder = setViewHolderToView(lView);
    } else {
        lHolder = (ViewTableNameSpinnerHolder) lView.getTag();
    }
    StatesDbViewer lEntry = mDataList.get(pPosition);
    lHolder.name.setText(lEntry.getDisplayName(getContext()));
    return lView;
}
Also used : StatesDbViewer(com.secupwn.aimsicd.enums.StatesDbViewer) ViewTableNameSpinnerHolder(com.secupwn.aimsicd.adapters.holders.ViewTableNameSpinnerHolder) TextView(android.widget.TextView) View(android.view.View)

Example 2 with ViewTableNameSpinnerHolder

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

the class DbViewerSpinnerAdapter method setViewHolderToView.

private ViewTableNameSpinnerHolder setViewHolderToView(View pView) {
    ViewTableNameSpinnerHolder lHolder;
    lHolder = new ViewTableNameSpinnerHolder();
    lHolder.name = (TextView) pView.findViewById(R.id.item_name);
    pView.setTag(lHolder);
    return lHolder;
}
Also used : ViewTableNameSpinnerHolder(com.secupwn.aimsicd.adapters.holders.ViewTableNameSpinnerHolder)

Aggregations

ViewTableNameSpinnerHolder (com.secupwn.aimsicd.adapters.holders.ViewTableNameSpinnerHolder)2 View (android.view.View)1 TextView (android.widget.TextView)1 StatesDbViewer (com.secupwn.aimsicd.enums.StatesDbViewer)1