Search in sources :

Example 1 with SearchView

use of com.google.android.apps.nexuslauncher.search.nano.SearchProto.SearchView in project Neo-Launcher by NeoApplications.

the class ConfigBuilder method build.

public byte[] build() {
    mNano.bgColor = getBackgroundColor();
    mNano.isDark = Themes.getAttrBoolean(mActivity, R.attr.isMainColorDark);
    if (mIsAllApps) {
        setAllAppsSearchView();
    } else {
        setHotseatSearchView();
    }
    mNano.iconViewTemplate = "icon_view_template";
    mBundle.putParcelable(mNano.iconViewTemplate, searchIconTemplate());
    mNano.iconLongClick = "icon_long_click";
    mBundle.putParcelable(mNano.iconLongClick, PendingIntent.getBroadcast(mActivity, 2055, new Intent().setComponent(new ComponentName(mActivity, LongClickReceiver.class)), PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT));
    LongClickReceiver.bq(mActivity);
    mNano.bounds = getViewBounds(mQsbLayout);
    mNano.isAllApps = mIsAllApps;
    if (mIsAllApps) {
        createSearchTemplate();
    }
    SearchView searchView = new SearchView();
    searchView.base = mNano;
    return MessageNano.toByteArray(searchView);
}
Also used : SearchView(com.google.android.apps.nexuslauncher.search.nano.SearchProto.SearchView) Intent(android.content.Intent) PendingIntent(android.app.PendingIntent) ComponentName(android.content.ComponentName)

Aggregations

PendingIntent (android.app.PendingIntent)1 ComponentName (android.content.ComponentName)1 Intent (android.content.Intent)1 SearchView (com.google.android.apps.nexuslauncher.search.nano.SearchProto.SearchView)1