小编Jer*_*rds的帖子

ImageButton在Android中使用Transitions

我正在尝试创建一个具有自定义选择器的透明(无按钮背景)ImageButton.我让选择器对着按钮工作,但我现在希望选择器drawables相互交叉淡入淡出.我看到了可以用XML表示的TransitionDrawable对象.有没有办法将它连接到我的选择器?

下面是在屏幕左下角的屏幕上创建图像按钮的XML布局代码.它目前从一个图像到另一个图像突然忽略了转换XML.

selector_button.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@drawable/transition_normal_to_pressed" /> <!-- pressed -->
    <item android:state_focused="true" android:drawable="@drawable/transition_pressed_to_normal" /> <!-- focused -->
    <item android:drawable="@drawable/menu_normal" /> <!-- default -->
</selector>
Run Code Online (Sandbox Code Playgroud)

transition_normal_to_pressed.xml

<?xml version="1.0" encoding="utf-8"?>
<transition xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/menu_pressed" />
    <item android:drawable="@drawable/menu_normal" />
</transition>
Run Code Online (Sandbox Code Playgroud)

activity.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <ImageButton
        android:id="@+id/btnMenu"
        android:background="@android:color/transparent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/selector_button"
        android:layout_alignParentLeft="true"
        android:layout_alignParentBottom="true" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

android imagebutton transitions

6
推荐指数
1
解决办法
5996
查看次数

创建UI设计器

我想为自定义系统创建一个使用Silverlight,WPF或WinForms的UI设计器.解决这个问题的最佳方法是什么?

我应该注意哪些命名空间,sdks等?

.net silverlight wpf user-interface winforms

5
推荐指数
2
解决办法
3734
查看次数

Hypervisor VM有哪些好处?

我正在研究使用虚拟机来托管多个操作系统,我正在寻找有很多这些操作系统的免费解决方案.我对管理程序是什么感到困惑,为什么它们与"标准"虚拟机不同或更好.当我的意思是标准时,我将使用基准虚拟机VMWare Server 2.0.

对于具有4 GB RAM的双核系统,该系统最多可运行3个VM.哪个是最好的选择?管理程序或非管理程序,为什么?我已经阅读过维基百科的文章,但技术细节已经超出我的想象.我需要一个基本答案,了解这些不同的VM口味对我有什么影响.

我的主要问题涉及如何在多种环境中进行测试.我担心操作系统的隔离,因此我可以同时测试多个操作系统上的应用程序.还有哪种味道可以更真实地体验真机的运行方式?

我正在考虑以下事项:

(管理程序)

  • Xen的
  • Hyper-V的

(非管理程序)

  • VirtualBox的
  • VMWare Server 2.0
  • Virtual PC 2007

*我列出的VM的分类可能不正确.

virtual-machine hypervisor

2
推荐指数
2
解决办法
6138
查看次数

使用Android SDK在联系人中获取地址

我正在尝试从Android联系人列表中检索联系人的姓名,电话号码和地址.名称和电话非常简单,但1.6 api级别的地址似乎无法访问.

有人想出如何获得联系人的地址吗?2.0中还有一个全新的api.如何通过使用1二进制来利用这个并回退到旧的api.如果这是可能的.

android import-contacts addressbook google-contacts-api

1
推荐指数
2
解决办法
2万
查看次数

Silverlight或WPF远程桌面UserControl

是否在WPF中创建了允许RDP访问的自定义UserControl.我知道RDP 5.1的ActiveX控件,但我更喜欢可以嵌入Silverlight应用程序中的东西.

silverlight wpf user-controls remote-desktop

0
推荐指数
1
解决办法
5532
查看次数