-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
kace-runtime/src/main/java/com/kanyun/kace/KaceViewUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.kanyun.kace; | ||
|
||
import android.view.View; | ||
|
||
/** | ||
* Created by benny at 2023/8/17 15:28. | ||
*/ | ||
public class KaceViewUtils { | ||
|
||
public static <T extends View> T findViewById(View view, int id, Class<T> viewClass) { | ||
return view.findViewById(id); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
kace-sample/app/src/main/java/com/kanyun/kace/sample/demo/GenericView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.kanyun.kace.sample.demo | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.View | ||
|
||
/** | ||
* Created by benny at 2023/8/17 15:37. | ||
*/ | ||
class GenericView<T> | ||
@JvmOverloads constructor( | ||
context: Context?, attrs: AttributeSet? = null, defStyleAttr: Int = 0 | ||
) : View(context, attrs, defStyleAttr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters