Remove SetupWizardRecyclerItemsLayout

Its functionalities were folded into SetupWizardRecyclerLayout and
has been deprecated. Codesearch shows no usage of this class so it
should be safe to remove.

Test: Existing tests pass. (./gradlew connectedAndroidTest)
Change-Id: Ie56a5ecdb9bd4b8ad91461794a6cd89e3c5fd8e1
This commit is contained in:
Maurice Lam 2016-12-20 13:44:54 -08:00
parent 3e26e520f5
commit 0454e18c0b
3 changed files with 5 additions and 46 deletions

View file

@ -19,7 +19,7 @@
<attr name="suwHasStableIds" format="boolean|reference" />
<declare-styleable name="SuwSetupWizardRecyclerItemsLayout">
<declare-styleable name="SuwSetupWizardRecyclerLayout">
<attr name="android:entries" />
<attr name="suwDividerInset" />
<attr name="suwHasStableIds" />

View file

@ -1,41 +0,0 @@
/*
* Copyright (C) 2015 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.
*/
package com.android.setupwizardlib;
import android.content.Context;
import android.util.AttributeSet;
import com.android.setupwizardlib.items.RecyclerItemAdapter;
/**
* @deprecated Use {@link com.android.setupwizardlib.SetupWizardRecyclerLayout}
*/
@Deprecated
public class SetupWizardRecyclerItemsLayout extends SetupWizardRecyclerLayout {
public SetupWizardRecyclerItemsLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SetupWizardRecyclerItemsLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public RecyclerItemAdapter getAdapter() {
return (RecyclerItemAdapter) super.getAdapter();
}
}

View file

@ -77,18 +77,18 @@ public class SetupWizardRecyclerLayout extends SetupWizardLayout {
private void init(Context context, AttributeSet attrs, int defStyleAttr) {
final TypedArray a = context.obtainStyledAttributes(attrs,
R.styleable.SuwSetupWizardRecyclerItemsLayout, defStyleAttr, 0);
R.styleable.SuwSetupWizardRecyclerLayout, defStyleAttr, 0);
final int xml = a.getResourceId(
R.styleable.SuwSetupWizardRecyclerItemsLayout_android_entries, 0);
R.styleable.SuwSetupWizardRecyclerLayout_android_entries, 0);
if (xml != 0) {
final ItemGroup inflated = (ItemGroup) new ItemInflater(context).inflate(xml);
mAdapter = new RecyclerItemAdapter(inflated);
mAdapter.setHasStableIds(a.getBoolean(
R.styleable.SuwSetupWizardRecyclerItemsLayout_suwHasStableIds, false));
R.styleable.SuwSetupWizardRecyclerLayout_suwHasStableIds, false));
setAdapter(mAdapter);
}
int dividerInset = a.getDimensionPixelSize(
R.styleable.SuwSetupWizardRecyclerItemsLayout_suwDividerInset, 0);
R.styleable.SuwSetupWizardRecyclerLayout_suwDividerInset, 0);
if (dividerInset == 0) {
dividerInset = getResources()
.getDimensionPixelSize(R.dimen.suw_items_icon_divider_inset);