1 /* 2 * Copyright (C) 2020 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 package com.android.tv.settings.about; 17 18 import android.os.Bundle; 19 import android.view.LayoutInflater; 20 import android.view.View; 21 import android.view.ViewGroup; 22 import android.widget.ImageView; 23 import android.widget.TextView; 24 25 import androidx.annotation.Keep; 26 27 import com.android.tv.twopanelsettings.R; 28 import com.android.tv.twopanelsettings.slices.InfoFragment; 29 30 /** An {@InfoFragment} that hosts preview pane of system update. */ 31 @Keep 32 public class SystemUpdateInfoFragment extends InfoFragment { 33 @Override onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)34 public View onCreateView( 35 LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 36 View view = super.onCreateView(inflater, container, savedInstanceState); 37 ((ImageView) view.findViewById(R.id.info_title_icon)) 38 .setImageResource(R.drawable.ic_info_outline_base); 39 view.findViewById(R.id.info_title_icon).setVisibility(View.VISIBLE); 40 ((TextView) view.findViewById(R.id.info_summary)) 41 .setText(R.string.system_update_description); 42 view.findViewById(R.id.info_summary).setVisibility(View.VISIBLE); 43 return view; 44 } 45 @Override updateInfoFragment()46 public void updateInfoFragment() { 47 // No-op as this is hosting a static info preview panel 48 } 49 } 50