Build a new FooterPreference UI.

- Create a new layout for footer prefs.
- Create a new FooterPreference type to use the layout
- Create a Mixin to create and add the pref to screen
- Create a new lifecycle observer type to invoke mixin at right time
- Switch SettingsPreferenceFragment to use footer mixin.
- Switch FingerprintSettings to use the new footer pref.

Bug: 33579394
Test: RunSettingsRoboTests
Change-Id: I548ac39a0d120196a7ffed09b4f98bd9a80bae90
This commit is contained in:
Fan Zhang
2016-12-13 12:42:50 -08:00
parent 1b89a9a4e1
commit d5b48454a3
16 changed files with 454 additions and 94 deletions

View File

@@ -16,21 +16,21 @@
package com.android.settings.widget;
import static junit.framework.Assert.assertEquals;
import android.content.Context;
import android.view.View.MeasureSpec;
import com.android.settings.SettingsRobolectricTestRunner;
import com.android.settings.TestConfig;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
@RunWith(RobolectricTestRunner.class)
import static junit.framework.Assert.assertEquals;
@RunWith(SettingsRobolectricTestRunner.class)
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
public class RingProgressBarTest {