Android UI 框架 Lattekit
- 授权协议: MIT
- 开发语言:
- 操作系统: Android
- 软件首页: https://github.com/maannajjar/lattekit
- 软件文档: https://github.com/maannajjar/lattekit/blob/master/README.md
- 官方下载: https://github.com/maannajjar/lattekit/archive/master.zip
软件介绍
Lattekit 是采用Kotlin编写的一个Android UI 框架。
快速示例学习 :
package io.lattekit.helloworld
import android.app.Activity
import android.os.Bundle
import android.view.View
import android.widget.EditText
import io.lattekit.annotation.Bind
import io.lattekit.plugin.css.declaration.css
import io.lattekit.render
import io.lattekit.view.LatteView
class MainActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
render("<io.lattekit.helloworld.MyApp />")
}
}
open class MyApp : LatteView() {
@Bind("@id/myText") var myText : EditText? = null;
init {
css("""
.question { font-size: 20sp; font-weight: bold; }
.input { font-size: 14sp; margin-top:8dp; width: match_parent; }
.answer { font-size: 20sp; font-weight: bold; margin-top: 10dp; color: #00AADE; }
""")
// or: css("com.my.package/file.css")
}
override fun layout() = xml("""
<LinearLayout padding="30dp" orientation="vertical">
<TextView text="What's your name?" class="question"/>
<EditText id="@+id/myText" hint="Type your name here"
onTextChanged=${{ notifyStateChanged() }} class="input"/>
<TextView text=${"Hello ${myText?.text}"}
visibility=${if (myText?.text?.toString() == "") View.GONE else View.VISIBLE} class="answer"/>
</LinearLayout>
""")
}其他示例:
从界面到网络空间
(美)海姆 / 金吾伦/刘钢 / 上海科技教育出版社 / 2000-7 / 16.40元
计算机急剧改变了20世纪的生活。今天,我们凭借遍及全球的计算机网络加速了过去以广播、报纸和电视形式进行的交流。思想风驰电掣般在全球翻飞。仅在角落中潜伏着已完善的虚拟实在。在虚拟实在吕,我们能将自己沉浸于感官模拟,不仅对现实世界,也对假想世界。当我们开始在真实世界与虚拟世界之间转换时,迈克尔·海姆问,我们对实在的感觉如何改变?在〈从界面到网络空间〉中,海姆探讨了这一问题,以及信息时代其他哲学问题。他......一起来看看 《从界面到网络空间》 这本书的介绍吧!


