我有一个TableLayout,底部有一个按钮.我的问题是按钮伸展以填充列的整个宽度,即使我不希望它那么宽.

XML看起来像这样:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:stretchColumns="*"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableRow android:layout_height="wrap_content"
android:layout_width="fill_parent">
<CheckBox android:id="@+id/check1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Some text 1"/>
<CheckBox android:id="@+id/check2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Some text 1"/>
</TableRow>
<TableRow android:layout_height="wrap_content"
android:layout_width="fill_parent">
<CheckBox android:id="@+id/check3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Even some more text 2"/>
<CheckBox android:id="@+id/check4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Even some more text 2"/>
</TableRow>
<TableRow android:layout_height="wrap_content"
android:layout_width="fill_parent">
<CheckBox android:id="@+id/check5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="An even longer line of text 3"/>
<CheckBox android:id="@+id/check6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Another longer line of text 3"/>
</TableRow>
<EditText
android:id="@+id/myEditText1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine" …Run Code Online (Sandbox Code Playgroud) 我喜欢WPF和.NET编程.它非常强大,灵活,你可以在其中做很酷的事情.
但我有点担心它是否会得到很大的牵引力.当我与其他sw工程师交谈时,人们似乎对此并不了解,很多在线开发者论坛上的WPF部分往往会获得非常轻的流量.
2年前有人在这里(WPF作为一种技术有多受欢迎?)发布了一个关于此的问题,所以我想在2010年重新审视这个问题.
WPF有腿吗?它真的会起飞吗?它有主要的企业采用者吗?既然我喜欢编程,那么未来几年这是一个很好的职业生涯吗?
提前感谢您的任何意见或建议!
Android Canvas类支持一组丰富的绘图基元 - 圆形,线条等.我有一个应用程序,使用这些来绘制一些统计数据.
阅读http://developer.android.com/reference/android/graphics/Canvas.html#drawLine%28float,%20float,%20float,%20float,%20android.graphics.Paint%29上的说明 ...我不清楚坐标是什么单位或如何使它们与设备/分辨率无关.
这些是什么单位以及什么是绘制线条和圆形以及矩形的"最佳实践",它们适用于许多不同的屏幕尺寸和分辨率?提前致谢.
我想在我的HTC Incredible上运行和调试我的Android应用程序.在http://developer.android.com/guide/developing/device.html上,它说我必须安装Windows USB驱动程序.并且说明如下:
"1.将Android设备连接到计算机的USB端口.Windows将检测设备并启动硬件更新向导"
但事实并非如此.当我连接手机时,它显示为驱动器号,其SD卡作为第二个驱动器号可见,我可以传输文件.但硬件更新向导无法启动.也没有连接 - 如果我转到我的SDK工具目录并执行"adb devices",它将返回空白.
那么我需要做些什么才能在手机上进行调试?提前致谢!!
我正在学习Android对话框,我对于决定他们身高的因素感到困惑.如果我将此XML用于我的对话框布局...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/AButton"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10px"
android:text="Click Me to Dismiss"
/>
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_toLeftOf="@id/AButton"
android:text="Click this button: "
/>
<ImageView
android:id="@+id/an_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="42px"
android:src="@drawable/screw50">
</ImageView>
/>
Run Code Online (Sandbox Code Playgroud)
我得到了这个对话框...

但是Developer.Android.com说......
" WRAP_CONTENT,这意味着视图要大到足以包含其内容(加上填充) "
...那么为什么对话框要比它需要的高得多呢?
如果我用.替换布局高度
android:layout_height="200px"
Run Code Online (Sandbox Code Playgroud)
它做了一个适当的简短对话,但我不想使用明确的像素高度(这不是好习惯).如何使对话框的内容足够大?
在http://developer.android.com/sdk/win-usb.html上, android Developers列出了为Windows Vista和Windows XP安装USB驱动程序的说明.但Windows在Windows 7中的当前操作系统 - 在哪里有说明?(FWIW我使用的是Windows 7 64位.我的Eclipse和Java工具是32位)
顺便说一句,我知道有很多关于第三方的建议,评论和争论,但是有什么官方的Android /谷歌吗?
我有2个XP系统,在编辑android_winusb.inf后可以正常使用我的Droid Incredible.
提前致谢.
最近我下载了Aptana Studio 3,因为它被广泛推荐.当我第一次运行它时,它会建立一个对话框,说它是"配置git支持",没有按钮可以选择不使用它.当我继续它时,它会出现一个"进度对话框",说"配置Git支持(可能需要几分钟)",带有灰色的取消按钮,它不会让我最小化(全屏)Aptana窗口所以在等待的时候,我无法访问我的桌面进行其他工作.10分钟后,我在任务经理中杀死了Aptana.
我重新启动了Aptana并在起始页面中点击了Aptana文档,但它将我发送到了一个关于Titanium的页面! 问题:
提前致谢!
我是一个新手Android开发人员,我也在市场上推出一款新手机,所以我上周花了所有的Verizon'机器人与我妻子的iPhone进行并排比较.我们发现了很多问题.一个问题出现在运行2.2的2个不同制造商的手机上,但是在运行2.2的Eclipse中我的Android模拟器上没有出现这个问题!
我的问题: Google是否有类似于Microsoft知识库(着名的KB)的已知问题(以及变通方法和状态)的可搜索列表?
NB 我不是要求列出人们遇到的错误 - 我可以通过谷歌搜索发现 - 微软的知识库文章是公司承认的问题,它们通常包含变通方法或其他有用的信息.