Tag: 材质

棒棒糖RippleDrawable与select器的前棒棒糖

我有不同的draw9patch png作为背景的button。 目前button由selector控制,如下所示: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/pressed" android:state_pressed="true"/> <item android:drawable="@drawable/disabled" android:state_enabled="false"/> <item android:drawable="@drawable/focused" android:state_focused="true"/> <item android:drawable="@drawable/default"/> </selector> 对于Android棒棒糖,他们有一个RippleDrawable触摸效果,这是这样的: <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight"> <item> … </item> </ripple> 对于新的触摸涟漪效应: 1:我可以将draw9patch设置为RippleDrawable背景吗? 2:如何容纳上面两种不同的xml我想遵循材质devise? 我必须为新的RippleDrawable分出一个新的文件夹/布局xml吗?

调用LoadScene / LoadLevel后,场景中的对象变暗

我完成了Unity的roll-a-ball教程,它工作正常。 我改变了一些材料,使其看起来更好。 我还添加了一个C#脚本,当玩家掉在地上时我应该重新开始关卡(我禁用了墙壁)。 我正在使用Unity 5.5。 它最初看起来像这样: 但是,当我离开边缘和水平重新启动,它看起来像这样: 编辑器加载完成后,在打开unity之后,它有时会看起来像几秒钟。 这是脚本: using UnityEngine; using System.Collections; public class DeathTrigger : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } void OnTriggerEnter (Collider other) { if (other.gameObject.CompareTag("Player")) Application.LoadLevel(Application.loadedLevel); } } 任何想法是什么导致这个?

Android材质devisebutton样式

我对材质devise的button样式感到困惑。 我想要在附加的链接中得到五颜六色的凸起button,就像在使用部分下看到的“强制停止”和“卸载”button。 有没有可用的样式,还是我需要定义它们? http://www.google.com/design/spec/components/buttons.html#buttons-usage 我找不到默认的button样式。 例: <Button style="@style/PrimaryButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Calculate" android:id="@+id/button3" android:layout_below="@+id/editText5" android:layout_alignEnd="@+id/editText5" android:enabled="true" /> 如果我尝试通过添加更改button的背景颜色 android:background="@color/primary" 所有的风格消失,如触摸animation,阴影,圆angular等