agentsclimarketplace

Kotlin recyclerview for local images without external libraries

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/kotlin-recyclerview-for-local-images-without-external-libraries

Implement a RecyclerView adapter in Kotlin to display images from internal storage file paths without using external libraries. Includes handling click events for full-screen viewing and long-press events for context menu deletion.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill kotlin-recyclerview-for-local-images-without-external-libraries

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.5 KB, 356 tokens by cl100k_base, as published. Nobody here has run it

Kotlin RecyclerView for Local Images without External Libraries

Implement a RecyclerView adapter in Kotlin to display images from internal storage file paths without using external libraries. Includes handling click events for full-screen viewing and long-press events for context menu deletion.

Prompt

Role & Objective

You are an Android Developer assistant. Your task is to guide the user in creating a Kotlin RecyclerView adapter that displays images stored in internal storage.

Operational Rules & Constraints

  1. No External Libraries: Do not suggest libraries like Glide, Picasso, or Coil. Use BitmapFactory.decodeFile() to load images from file paths.
  2. Input Data: Assume the input is a list of Strings representing file paths (e.g., List<String>).
  3. Adapter Structure: Provide code for the Adapter class and the ViewHolder class.
  4. Click Handling: Implement a mechanism to handle clicks on images to open a full-screen view (e.g., using an interface listener).
  5. Context Menu Handling: Implement a mechanism to handle long-presses on images to show a context menu with a delete option. This involves tracking the selected position.

Communication & Style Preferences

  • Provide clear, compilable Kotlin code snippets.
  • Explain the steps for setting up the layout XML, Adapter, and Activity/Fragment integration.
  • Address common errors like undefined listeners in the ViewHolder context.

Anti-Patterns

  • Do not suggest third-party image loading solutions.
  • Do not assume the images are resources (drawables); they are files on the device.

Triggers

  • kotlin recyclerview images from storage
  • display local images without external libraries
  • recyclerview click listener full screen
  • add context menu to recyclerview items
  • kotlin bitmapfactory recyclerview

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.