docs: Cursor rule for prototyping

This commit is contained in:
deltazefiro
2025-02-14 22:32:02 +08:00
parent 8b89dbbfbe
commit a69eb0fd0c
2 changed files with 17 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
---
description: Apply when you are explicitly asked to implement a quick prototype.
globs:
---
# Prototype Guidelines
1. Use `debugPref` in `ui/settings/AboutCategory.java` as your prototype entry point:
- For feature testing: Trigger your new code when `debugPref` is clicked
- For UI testing: Launch your test view when `debugPref` is clicked
2. Use `R.drawable.ic_null` instead of creating new drawable assets
3. Keep changes minimal and prefer adding new code over modifying existing code
@@ -76,5 +76,11 @@ public class AboutCategory extends BaseCategory {
usagePref.setIntent(new Intent(Intent.ACTION_VIEW,
Uri.parse(activity.getString(R.string.doc_url))));
addPreference(usagePref);
var debugPref = new Preference(activity);
debugPref.setTitle(R.string.show_debug_info);
debugPref.setIcon(R.drawable.ic_null);
debugPref.setSummary(R.string.debug_info_description);
addPreference(debugPref);
}
}