我有一个ProgressDialog我已经定位到我的屏幕底部,因为没有重叠徽标.我想要做的是创建一个自定义样式ProgressDialog,删除背景和边框.我在这里没有运气.
有没有人知道如何应用这种风格?
我正在使用一个简单的PHP API(我写的)返回一个JSON格式的字符串,例如:
[["Air Fortress","5639"],["Altered Beast","6091"],["American Gladiators","6024"],["Bases Loaded II: Second Season","5975"],["Battle Tank","5944"]]
Run Code Online (Sandbox Code Playgroud)
我现在有一个包含JSON格式字符串的String,但需要将其转换为两个String数组,一个用于name,另一个用于id.有没有快速的方法来实现这一目标?
我无法为我的生活缠绕这个布局.我已经设法将按钮放到底部,但因为它们处于相对布局中,所以我不能让它们都达到50%.这是我到目前为止所做的,为了简化,删除了一些代码:
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="50dip">
<LinearLayout android:id="@+id/LinearLayout02"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="15px">
<ImageView android:id="@+id/ImageView02"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginBottom="15px"
android:layout_gravity="center_vertical|center_horizontal|center"/>
<TextView
android:id="@+id/barcode"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/item_number"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/release"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/other_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/box_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true">
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:id="@+id/add_bt"
android:text="Add to Collection" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:id="@+id/back_bt"
android:text="Go Back" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)