Search in sources :

Example 1 with OmniJawsClient

use of com.android.internal.util.rr.OmniJawsClient in project android_frameworks_base by ResurrectionRemix.

the class QuickStatusBarHeader method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mEmergencyOnly = (TextView) findViewById(R.id.header_emergency_calls_only);
    mEdit = findViewById(android.R.id.edit);
    findViewById(android.R.id.edit).setOnClickListener(view -> mHost.startRunnableDismissingKeyguard(() -> mQsPanel.showEdit(view)));
    mDateTimeAlarmGroup = (ViewGroup) findViewById(R.id.date_time_alarm_group);
    mDateTimeAlarmGroup.findViewById(R.id.empty_time_view).setVisibility(View.GONE);
    mDateTimeGroup = (ViewGroup) findViewById(R.id.date_time_group);
    mDateTimeGroup.setPivotX(0);
    mDateTimeGroup.setPivotY(0);
    mDateTimeTranslation = getResources().getDimension(R.dimen.qs_date_time_translation);
    mShowFullAlarm = getResources().getBoolean(R.bool.quick_settings_show_full_alarm);
    mClock = (View) findViewById(R.id.clock);
    mClock.setOnClickListener(this);
    mDate = (View) findViewById(R.id.date);
    mDate.setOnClickListener(this);
    mExpandIndicator = (ExpandableIndicator) findViewById(R.id.expand_indicator);
    mHeaderQsPanel = (QuickQSPanel) findViewById(R.id.quick_qs_panel);
    mSettingsButton = (SettingsButton) findViewById(R.id.settings_button);
    mSettingsContainer = findViewById(R.id.settings_button_container);
    mSettingsButton.setOnClickListener(this);
    mSettingsButton.setOnLongClickListener(this);
    mWeatherClient = new OmniJawsClient(mContext);
    mWeatherEnabled = mWeatherClient.isOmniJawsEnabled();
    mWeatherContainer = (LinearLayout) findViewById(R.id.weather_container);
    mWeatherimage = (ImageView) findViewById(R.id.weather_image);
    mNoWeatherimage = (ImageView) findViewById(R.id.no_weather_image);
    mWeatherLine1 = (TextView) findViewById(R.id.weather_line_1);
    mWeatherLine2 = (TextView) findViewById(R.id.weather_line_2);
    queryAndUpdateWeather();
    mAlarmStatusCollapsed = findViewById(R.id.alarm_status_collapsed);
    mAlarmStatusCollapsed.setOnClickListener(this);
    mAlarmStatus = (TextView) findViewById(R.id.alarm_status);
    mAlarmStatus.setOnClickListener(this);
    mTaskManagerButton = (TaskManagerButton) findViewById(R.id.task_manager_button);
    mTaskManagerButton.setOnClickListener(this);
    mMultiUserSwitch = (MultiUserSwitch) findViewById(R.id.multi_user_switch);
    mMultiUserAvatar = (ImageView) mMultiUserSwitch.findViewById(R.id.multi_user_avatar);
    // RenderThread is doing more harm than good when touching the header (to expand quick
    // settings), so disable it for this view
    ((RippleDrawable) mSettingsButton.getBackground()).setForceSoftware(true);
    ((RippleDrawable) mExpandIndicator.getBackground()).setForceSoftware(true);
    ((RippleDrawable) mTaskManagerButton.getBackground()).setForceSoftware(true);
    mBackgroundImage = (ImageView) findViewById(R.id.background_image);
    updateResources();
}
Also used : OmniJawsClient(com.android.internal.util.rr.OmniJawsClient) RippleDrawable(android.graphics.drawable.RippleDrawable)

Aggregations

RippleDrawable (android.graphics.drawable.RippleDrawable)1 OmniJawsClient (com.android.internal.util.rr.OmniJawsClient)1