所以我一直试图在android中的listview下添加一个按钮,问题是按钮没有出现.
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
android:id="@+id/widget0"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ListView
android:id="@+id/messagelist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="0px"
android:layout_y="0px">
</ListView>
<Button
android:id="@+id/addbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
android:layout_x="0px"
android:layout_y="379px">
</Button>
</AbsoluteLayout>
Run Code Online (Sandbox Code Playgroud) 我正在尝试构建一个具有不同类型用户的应用程序,我正在使用authlogic进行用户身份验证.
所以我有一个用户模型,其中包含authlogic所需的字段以实现其魔力.我现在想要添加几个不同的模型来描述不同类型用户的额外字段.
假设用户注册,然后他会选择他的用户类型,当他完成注册时,他将能够添加特定于他的用户模型的信息.
最好的方法是什么?我目前正在研究多态模型,但我不确定这是最好的选择.非常感谢任何帮助,谢谢.