Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]:自定义组件问题

Closed Beginner friendly
#158 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, java
Domain
mobile

Research direction

Start by locating the SimpleRatingBar component and its handling of the XML gradeStep="one" setting, then trace how a selected grade is read and later assigned. Reproduce the reported case where selecting 3 yields 2.5 and setting that value throws an exception; done when the reported value can be set without the exception and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Description

bug
框架版本【必填】

v13.1

问题描述【必填】

SimpleRatingBar 这个组件,在xml定义了gradeStep="one" 在页面上操作滑动到 假如=3,此时获取到的值为2.5,是小数。再由后端返回把这个值设置给SimpleRatingBar,会抛出异常grade must be a multiple of 0.5f,后端返回的是之前选择的2.5

复现步骤【必填】

SimpleRatingBar 这个组件,在xml定义了gradeStep="one" 在页面上操作滑动到 假如=3,此时获取到的值为2.5,是小数。再由后端返回把这个值设置给SimpleRatingBar,会抛出异常grade must be a multiple of 0.5f,后端返回的是之前选择的2.5

是否必现【必填】

是

项目 targetSdkVersion【必填】

30

出现问题的手机信息【必填】

iqoo9pro

出现问题的安卓版本【必填】

15

问题信息的来源渠道【必填】

No response

是部分机型还是所有机型都会出现【必答】

其他机型没测试,这个bug跟机型无关

框架最新的版本是否存在这个问题【必答】

是

框架文档是否提及了该问题【必答】

是

是否已经查阅框架文档但还未能解决的【必答】

是

issue 列表中是否有人曾提过类似的问题【必答】

否

是否已经搜索过了 issue 列表但还未能解决的【必答】

是

是否可以通过 Demo 来复现该问题【必答】

是

提供报错堆栈

提供截图或视频

No response

提供解决方案

No response

Dominant language
Java
Stars
6.9k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getActivity/AndroidProject

All issues in getActivity/AndroidProject

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.