1 /* 2 * Copyright (C) 2017 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.car.settings.applications; 17 18 import android.os.Bundle; 19 import android.support.car.ui.PagedListView; 20 import android.support.v7.widget.RecyclerView; 21 import com.android.car.settings.common.CarSettingActivity; 22 import com.android.car.settings.R; 23 import com.android.car.settings.common.NoDividerItemDecoration; 24 25 /** 26 * Lists all installed applications and their summary. 27 */ 28 public class ApplicationSettingsActivity extends CarSettingActivity { 29 private static final String TAG = "ApplicationSettingsActivity"; 30 31 private PagedListView mListView; 32 private ApplicationListAdapter mAdapter; 33 34 @Override onCreate(Bundle savedInstanceState)35 protected void onCreate(Bundle savedInstanceState) { 36 super.onCreate(savedInstanceState); 37 setContentView(R.layout.paged_list); 38 39 mListView = (PagedListView) findViewById(R.id.list); 40 mListView.setDefaultItemDecoration(new NoDividerItemDecoration(this)); 41 mListView.setDarkMode(); 42 mAdapter = new ApplicationListAdapter(this /* context */, getPackageManager()); 43 mListView.setAdapter(mAdapter); 44 } 45 46 } 47