小编sou*_*lah的帖子

使用ratingBarStyleSmall样式时,ratingbar不起作用(不可点击)

当用户点击它时,ratingbar没有改变?

她是我的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="com.example.soulhis.testmaterialdesign.Test">
<RatingBar
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/ratingBar4"
    android:layout_centerVertical="true"
    style="?android:attr/ratingBarStyleSmall"
     android:layout_centerHorizontal="true" />
 </RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

当在android jellybean api level 17上测试使用ratingBarStyleSmall时,问题就出现了

xml android ratingbar

10
推荐指数
4
解决办法
7897
查看次数

找不到处理 Intent act=android.intent.action.OPEN_DOCUMENT 的 Activity

我正在遵循教程,但出现此错误,请帮助

android.content.ActivityNotFoundException:找不到可处理的活动 Intent { act=android.intent.action.OPEN_DOCUMENT cat=[android.intent.category.OPENABLE] typ=image/* }

我的课

public class Load_Image_Activity extends AppCompatActivity {

  private static final int REQUEST_OPEN_RESULT_CODE = 0;
   ImageView image;
   @Override
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_load__image_);

      image=(ImageView)findViewById(R.id.imageView2);

    Intent intent=new Intent(Intent.ACTION_OPEN_DOCUMENT);
    intent.addCategory(Intent.CATEGORY_OPENABLE);
    intent.setType("image/*");
    startActivityForResult(intent,REQUEST_OPEN_RESULT_CODE);
 }
}
Run Code Online (Sandbox Code Playgroud)

清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.app.soulhi.slider">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity android:name=".Load_Image_Activity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

android image android-intent android-studio

4
推荐指数
1
解决办法
3716
查看次数

标签 统计

android ×2

android-intent ×1

android-studio ×1

image ×1

ratingbar ×1

xml ×1