android
Jedi Hongbin
hongbin.xyz meta.hongbin.xyz kmyc.hongbin.xyz
展开
-
android点击按钮控制图片切换-kotlin
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) initView() } private fun initView() { v.原创 2021-01-15 20:28:12 · 4035 阅读 · 4 评论 -
android kotlin事件监听
1 fun incrementCount(view: View) { handleCounter(1) } <Button ..... android:onClick="incrementCount" />2<Button ..... android:id="@+id/btn_increment" /> override fun onCreate(savedInstanceState: Bundle?) {原创 2021-01-15 20:14:21 · 817 阅读 · 0 评论 -
android计数器-Kotlin
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) } fun incrementCount(view: View) { handleCounte.原创 2021-01-15 19:14:00 · 654 阅读 · 0 评论 -
Activity四种启动模式-android
Intent intent = new Intent(MainActivity.this, MainActivity.class); startActivity(intent);1,默认 standard<activity android:name=".MainActivity" android:launchMode="standard">会生成新的activity在栈中2,singleTop<activity android:name=".M原创 2021-01-14 08:48:17 · 247 阅读 · 0 评论 -
Android ios RN开发环境问题
yarn android:java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7Reason: zip END header not found Exception in thread "main" java.util.zip.ZipException: zip END header not foundin thread "main" java.net.Unkn原创 2021-01-02 09:47:51 · 178 阅读 · 0 评论