Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de5560cc authored by Bryan Eyler's avatar Bryan Eyler Committed by android-build-merger
Browse files

Merge "Add username beside user switch." into oc-mr1-dev

am: 42aed466

Change-Id: I2032cc5ba64c43f0fedbc8e6800e52a539ac140d
parents 2c9cbf2c 42aed466
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -46,6 +46,15 @@
            android:scaleType="centerInside"/>
    </com.android.systemui.statusbar.phone.MultiUserSwitch>

    <TextView android:id="@+id/user_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="@dimen/car_qs_footer_user_name_text_size"
        android:textColor="@color/qs_user_detail_name"
        android:gravity="start|center_vertical"
        android:layout_centerVertical="true"
        android:layout_toEndOf="@id/multi_user_switch" />

    <com.android.systemui.statusbar.phone.SettingsButton
        android:id="@+id/settings_button"
        android:layout_alignParentEnd="true"
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2017, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/
-->
<resources>
    <dimen name="car_body2_size">32sp</dimen> <!-- B2 -->
</resources>
+5 −1
Original line number Diff line number Diff line
@@ -37,5 +37,9 @@
    <dimen name="car_start_driving_corner_radius">16dp</dimen>
    <dimen name="car_start_driving_padding_side">30dp</dimen>
    <dimen name="car_start_driving_height">80dp</dimen>
    <dimen name="car_start_driving_text_size">32sp</dimen> <!-- B2 -->
    <dimen name="car_start_driving_text_size">@dimen/car_body2_size</dimen>

    <dimen name="car_qs_footer_user_name_text_size">@dimen/car_body2_size</dimen>

    <dimen name="car_body2_size">26sp</dimen>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.android.systemui.Dependency;
import com.android.systemui.R;
@@ -44,6 +45,7 @@ public class CarQSFooter extends RelativeLayout implements QSFooter,
    private UserInfoController mUserInfoController;

    private MultiUserSwitch mMultiUserSwitch;
    private TextView mUserName;
    private ImageView mMultiUserAvatar;
    private UserGridView mUserGridView;

@@ -56,6 +58,7 @@ public class CarQSFooter extends RelativeLayout implements QSFooter,
        super.onFinishInflate();
        mMultiUserSwitch = findViewById(R.id.multi_user_switch);
        mMultiUserAvatar = mMultiUserSwitch.findViewById(R.id.multi_user_avatar);
        mUserName = findViewById(R.id.user_name);

        mUserInfoController = Dependency.get(UserInfoController.class);

@@ -89,6 +92,7 @@ public class CarQSFooter extends RelativeLayout implements QSFooter,
    @Override
    public void onUserInfoChanged(String name, Drawable picture, String userAccount) {
        mMultiUserAvatar.setImageDrawable(picture);
        mUserName.setText(name);
    }

    @Override