| | |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.util.TypedValue; |
| | | import android.view.LayoutInflater; |
| | | import android.view.ViewGroup; |
| | |
| | | private final LayoutInflater inflater; |
| | | private PickCountryCallback callback = null; |
| | | private final Context context; |
| | | |
| | | public Adapter(Context ctx) { |
| | | inflater = LayoutInflater.from(ctx); |
| | | context = ctx; |
| | |
| | | public void setSelectedCountries(ArrayList<Country> selectedCountries) { |
| | | this.selectedCountries = selectedCountries; |
| | | notifyDataSetChanged(); |
| | | |
| | | } |
| | | |
| | | public void setCallback(PickCountryCallback callback) { |
| | |
| | | } |
| | | |
| | | private int itemHeight = -1; |
| | | |
| | | public void setItemHeight(float dp) { |
| | | itemHeight = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, dp, context.getResources().getDisplayMetrics()); |
| | | } |