我在布局中添加了RatingBar:
<RatingBar 
    android:id="@+id/ratingbar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:numStars="5"
    android:stepSize="1.0"
    />  
但评级栏的默认样式太大.
我试着通过添加android风格来改变它:style="?android:attr/ratingBarStyleSmall"
但结果太小,无法使用此属性设置费率.
我该怎么办?
我想将评级栏的颜色改为金色.
我不想自定义星星,我只想更改API 16或更高版本的颜色
 
我尝试了以下解决方案,但没有一个为我设计  
1.    
RatingBar ratingBar = (RatingBar) findViewById(R.id.ratingBar);
LayerDrawable stars = (LayerDrawable) ratingBar.getProgressDrawable();
stars.getDrawable(2).setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP);
2.
android:progressDrawable="@color/golden" in XML
我试图将视图缩放到一定的大小,但不能完全理解旋转的工作原理.
假设我只想向上缩放视图."pivotY"应该有什么价值?在XML中,它是一个百分比.如何以编程方式应用枢轴点?
例:
ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", scaleSize);
ObjectAnimator pivotY = ObjectAnimator.ofFloat(view, "pivotY", pivotPoint);
AnimatorSet set = new AnimatorSet();
set.PlayTogether(scaleY, pivotY);
我在尝试什么?
我已经有了一个网站,我正在尝试使用相同代码的API进行基于令牌的身份验证,以下是样本身份验证代码的开始
我在下面创建了一个控制器是代码.
class AccountController extends \App\Http\Controllers\Controller
{
    public function apilogin($UserData) {
        return json_decode($UserData);
    }
}
我的路线配置如下.
Route::group(['prefix' => 'api/v1', 'middleware' => 'auth.api'], function () {
    Route::post('/apilogin', 'API\User\Account\AccountController@apilogin');
});
**然后从邮差Chrome扩展程序,我发布了请求并且工作正常,如果我在Kernel.php中的$ middlewareGroups中评论以下行
\App\Http\Middleware\VerifyCsrfToken::class,
如果我从POSTMan Extension做GET请求,我没有问题VerifyCsrfToken
android ×3
animation ×1
laravel ×1
laravel-5 ×1
laravel-5.1 ×1
laravel-5.2 ×1
php ×1
pivot ×1
ratingbar ×1