是否有可能在手机关闭时启动类似闹钟的Android应用程序.
我想通过单击按钮将我的视图列表视图更改为 gridview 并将 gridview 返回到列表视图。这是我的 product.xml:-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/main_linear_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/product_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="name"
android:visibility="gone"/>
<TextView
android:id="@+id/product_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="name"
android:textColor="#166CED"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<TextView
android:id="@+id/product_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1000"
android:textColor="#D64530"/>
<TextView
android:id="@+id/product_discount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="discout price"
android:textColor="#D64530"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<TextView
android:id="@+id/product_href"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="name"
android:visibility="gone"/>
<RatingBar
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</LinearLayout> </LinearLayout></LinearLayout>
Run Code Online (Sandbox Code Playgroud)
这里我的 product_category.xml:-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="shoppingmazza.android.catalyst.com.dynamiclayout.ProductCategory">
<!-- Header …Run Code Online (Sandbox Code Playgroud) 我想以RatingBar编程方式改变我的风格.任何人都可以帮助我如何改变这种风格小我如何填写评级.我给你快照当前情况:
我的代码:
RatingBar ratingBar = new RatingBar(Review.this);
ratingBar.setStepSize((float) 0.5);
ratingBar.setMax(5);
ratingBar.setRating(Float.parseFloat(rating.get(i)));
Run Code Online (Sandbox Code Playgroud)