1 /* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 package com.android.systemui.keyguard.ui.view.layout.sections 19 20 import androidx.constraintlayout.widget.ConstraintLayout 21 import androidx.constraintlayout.widget.ConstraintSet 22 import androidx.constraintlayout.widget.ConstraintSet.VERTICAL 23 import com.android.systemui.res.R 24 import com.android.systemui.keyguard.shared.model.KeyguardSection 25 import javax.inject.Inject 26 27 class SplitShadeGuidelines @Inject constructor() : KeyguardSection() { addViewsnull28 override fun addViews(constraintLayout: ConstraintLayout) {} 29 bindDatanull30 override fun bindData(constraintLayout: ConstraintLayout) {} 31 applyConstraintsnull32 override fun applyConstraints(constraintSet: ConstraintSet) { 33 constraintSet.apply { 34 // For use on large screens, it will provide a guideline vertically in the center to 35 // enable items to be aligned on the left or right sides 36 create(R.id.split_shade_guideline, VERTICAL) 37 setGuidelinePercent(R.id.split_shade_guideline, 0.5f) 38 } 39 } 40 removeViewsnull41 override fun removeViews(constraintLayout: ConstraintLayout) {} 42 } 43