docs: Cursor rule for prototyping
This commit is contained in:
@@ -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,
|
usagePref.setIntent(new Intent(Intent.ACTION_VIEW,
|
||||||
Uri.parse(activity.getString(R.string.doc_url))));
|
Uri.parse(activity.getString(R.string.doc_url))));
|
||||||
addPreference(usagePref);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user