Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public View getView( final int position, View convertView, ViewGroup parent) {
- View view = super.getView(position, convertView, parent);
- ImageView imageView = view.findViewById(R.id.detailsimage);
- CardView cardView = view.findViewById(R.id.detailcardView);
- TextView textmo =view.findViewById(R.id.detailsmo);
- TextView texttu =view.findViewById(R.id.detailstu);
- TextView textwe =view.findViewById(R.id.detailswe);
- TextView textth =view.findViewById(R.id.detailsthu);
- TextView textfr =view.findViewById(R.id.detailsfri);
- TextView textsa =view.findViewById(R.id.detailssat);
- TextView textsu =view.findViewById(R.id.detailssun);
- final databasehandler db = new databasehandler(context);
- cardView.setOnLongClickListener(new View.OnLongClickListener() {
- @Override
- public boolean onLongClick(View v) {
- db.deleteTitle(position+1);
- Toast.makeText(context,Integer.toString(position),Toast.LENGTH_SHORT).show();
- notifyDataSetChanged();
- return true;
- }
- });
- imageView.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- HashMap<String, String> hashmap= arrayList.get(position);
- String string= hashmap.get("repeat");
- string = Objects.requireNonNull(string).trim();
- Toast.makeText(context,string,Toast.LENGTH_SHORT).show();
- }
- });
- HashMap<String, String> hashmap= arrayList.get(position);
- String string= Objects.requireNonNull(hashmap.get("repeat")).trim();
- String[] separated = Objects.requireNonNull(string).split("");
- }
- }}
- return view;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement