Add shadow to searchbar when user scrolls vertically
Bug: 63528057 Test: robotests Change-Id: Ib85676d78b43be38aab1eacd0820d0755a601f60
This commit is contained in:
@@ -40,6 +40,7 @@ import com.android.settings.dashboard.suggestions.SuggestionDismissController;
|
||||
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
||||
import com.android.settings.dashboard.suggestions.SuggestionsChecks;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settings.widget.ActionBarShadowController;
|
||||
import com.android.settingslib.drawer.CategoryKey;
|
||||
import com.android.settingslib.drawer.DashboardCategory;
|
||||
import com.android.settingslib.drawer.SettingsDrawerActivity;
|
||||
@@ -193,12 +194,14 @@ public class DashboardSummary extends InstrumentedFragment
|
||||
mDashboard.setLayoutManager(mLayoutManager);
|
||||
mDashboard.setHasFixedSize(true);
|
||||
mDashboard.setListener(this);
|
||||
Log.d(TAG, "adapter created");
|
||||
mAdapter = new DashboardAdapter(getContext(), bundle, mConditionManager.getConditions(),
|
||||
mSuggestionParser, this /* SuggestionDismissController.Callback */);
|
||||
mDashboard.setAdapter(mAdapter);
|
||||
mDashboard.setItemAnimator(new DashboardItemAnimator());
|
||||
mSummaryLoader.setSummaryConsumer(mAdapter);
|
||||
ActionBarShadowController.attachToRecyclerView(
|
||||
getActivity().findViewById(R.id.search_bar_container), getLifecycle(), mDashboard);
|
||||
|
||||
if (DEBUG_TIMING) {
|
||||
Log.d(TAG, "onViewCreated took "
|
||||
+ (System.currentTimeMillis() - startTime) + " ms");
|
||||
|
||||
@@ -44,7 +44,7 @@ public class CellularDataCondition extends Condition {
|
||||
setActive(false);
|
||||
return;
|
||||
}
|
||||
setActive(!telephony.getDataEnabled());
|
||||
setActive(!telephony.isDataEnabled());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,6 @@ import android.support.annotation.VisibleForTesting;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.hardware.AmbientDisplayConfiguration;
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.Settings.AmbientDisplayPickupSuggestionActivity;
|
||||
import com.android.settings.Settings.AmbientDisplaySuggestionActivity;
|
||||
@@ -64,7 +63,6 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider
|
||||
|
||||
private final SuggestionRanker mSuggestionRanker;
|
||||
private final MetricsFeatureProvider mMetricsFeatureProvider;
|
||||
private final AmbientDisplayConfiguration mAmbientDisplayConfig;
|
||||
|
||||
@Override
|
||||
public boolean isSuggestionEnabled(Context context) {
|
||||
@@ -116,7 +114,6 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider
|
||||
new SuggestionFeaturizer(new EventStore(appContext)));
|
||||
mMetricsFeatureProvider = FeatureFactory.getFactory(appContext)
|
||||
.getMetricsFeatureProvider();
|
||||
mAmbientDisplayConfig = new AmbientDisplayConfiguration(appContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user