[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7504":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":16,"starSnapshotCount":16,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},7504,"kotterknife","JakeWharton\u002Fkotterknife","JakeWharton","View \"injection\" library for Android.","",null,"Kotlin",2207,189,1,9,0,58.84,"Apache License 2.0",true,false,"master",[],"2026-06-12 04:00:34","Kotter Knife\n============\n\n**Deprecated**: This was a terrible idea because it allocates an object for every view reference.\nDo not use, and do not use anything like it.\nUse [view binding](https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Flibraries\u002Fview-binding) instead.\n\n![](art\u002Flogo.png)\n\n[Butter Knife][1]-esque view binding for Kotlin.\n\n```kotlin\npublic class PersonView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs) {\n  val firstName: TextView by bindView(R.id.first_name)\n  val lastName: TextView by bindView(R.id.last_name)\n\n  \u002F\u002F Optional binding.\n  val details: TextView? by bindOptionalView(R.id.details)\n\n  \u002F\u002F List binding.\n  val nameViews: List\u003CTextView> by bindViews(R.id.first_name, R.id.last_name)\n\n  \u002F\u002F List binding with optional items being omitted.\n  val nameViews: List\u003CTextView> by bindOptionalViews(R.id.first_name, R.id.middle_name, R.id.last_name)\n}\n```\n\nThese methods are available on subclasses of `Activity`, `Dialog`, `ViewGroup`, `Fragment`,\nthe support library `Fragment`, and recycler view's `ViewHolder`.\n\n\n\nDownload\n--------\n\nCurrently not available via Maven Central.\n\nA SNAPSHOT is available in the Sonatype snapshot repo.\n```groovy\ncompile 'com.jakewharton:kotterknife:0.1.0-SNAPSHOT'\n```\n\nYou can also copy `ButterKnife.kt` into your source tree. The file depends on the 'support-v4' and\n'recyclerview-v7' libraries but the dependency is easily removed by deleting a few lines.\n\nComments, suggestions, and pull requests are encouraged!\n\n\n\nLicense\n-------\n\n    Copyright 2014 Jake Wharton\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n [1]: http:\u002F\u002Fjakewharton.github.io\u002Fbutterknife\n","Kotter Knife 是一个用于 Android 的视图注入库，旨在简化 Kotlin 代码中对视图的引用。它提供了类似于 Butter Knife 的视图绑定功能，支持单个视图、可选视图以及视图列表的绑定，并且这些方法可以在 Activity、Dialog、ViewGroup、Fragment 等多种 Android 组件中使用。然而，该项目已被弃用，因为其设计会导致每个视图引用都分配一个对象，这在性能上是不理想的。开发者被建议转而使用官方推荐的 View Binding 功能来替代。尽管如此，在学习视图注入的概念时，Kotter Knife 仍可作为一个参考案例。",2,"2026-06-11 03:12:47","top_language"]