小编Sou*_*abh的帖子

需要完全透明的状态栏

嗨朋友我想知道我可以更改状态栏颜色或使其完全透明.

我尝试了很多东西,但是我无法获得完全透明的状态栏,所以这是我的代码..

V21/style.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>

        style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
            <!-- Customize your theme here. -->
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>

            <item name="android:windowTranslucentStatus">true</item>

            <item name="android:windowNoTitle">true</item>
            <item name="android:statusBarColor">@android:color/transparent</item>
            <item name="android:windowTranslucentNavigation">true</item>
        </style>
</resources>
Run Code Online (Sandbox Code Playgroud)

style.xml

    <resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>

    </style>
</resources>
Run Code Online (Sandbox Code Playgroud)

之后我的屏幕显示为...... 当前登录界面

我希望它像这样..

所需的登录屏幕

有人可以帮忙吗?谢谢.

android transparent statusbar android-studio

6
推荐指数
2
解决办法
3976
查看次数

从模型类获取数据到片段

我在从ModelLogin存储用户详细信息的类中获取数据时遇到问题,现在我想显示有关Profile Fragment如何从modelLogin.

我只想要名字、姓氏、电子邮件 ID。

模型登录.class

public class ModalLogin implements Parcelable {


    @SerializedName("result")
    @Expose
    private String result;
    @SerializedName("customer-id")
    @Expose
    private String customerId;
    @SerializedName("error_message")
    @Expose
    private String errorMessage;
    @SerializedName("apiName")
    @Expose
    private String apiName;
    @SerializedName("first_name")
    @Expose
    private String firstName;
    @SerializedName("last_name")
    @Expose
    private String lastName;
    @SerializedName("email")
    @Expose
    private String email;
    @SerializedName("quoteId")
    @Expose
    private Integer quoteId;
    @SerializedName("token")
    @Expose
    private String token;

    protected ModalLogin(Parcel in) {
        result = in.readString();
        customerId = in.readString();
        errorMessage = in.readString();
        apiName = in.readString();
        firstName = …
Run Code Online (Sandbox Code Playgroud)

android android-fragments

5
推荐指数
1
解决办法
525
查看次数

增量操作栏使用片段查看按钮单击时的Badger

我正在进行电子商务任务,我想在按钮点击Add To Cart时将项目添加到购物车中,当我点击需要添加到购物车中的按钮项目并查看獾需要增加时.

所以我想在这个操作中执行Fragment,如果你不明白我的问题,那么看看快照,你会明白我想问的是什么?

如果购物车中没有物品 - 在此输入图像描述

当我点击按钮购物车项目添加到购物车,它显示如下.. 在此输入图像描述

那么如何使用Fragments和增加视图badger 来执行此操作.谢谢

android cart android-fragments

3
推荐指数
1
解决办法
571
查看次数