Merge "[Panlingual] Set focus to the drag list to avoid the overlapping" into udc-qpr-dev
This commit is contained in:
@@ -104,7 +104,6 @@ public class LocaleListEditor extends RestrictedSettingsFragment implements View
|
||||
|
||||
addPreferencesFromResource(R.xml.languages);
|
||||
final Activity activity = getActivity();
|
||||
activity.setTitle(R.string.language_picker_title);
|
||||
mLocaleHelperPreferenceController = new LocaleHelperPreferenceController(activity);
|
||||
final PreferenceScreen screen = getPreferenceScreen();
|
||||
mLocalePickerPreference = screen.findPreference(KEY_LANGUAGES_PICKER);
|
||||
@@ -358,12 +357,12 @@ public class LocaleListEditor extends RestrictedSettingsFragment implements View
|
||||
final LocaleLinearLayoutManager llm = new LocaleLinearLayoutManager(getContext(), mAdapter);
|
||||
llm.setAutoMeasureEnabled(true);
|
||||
list.setLayoutManager(llm);
|
||||
|
||||
list.setHasFixedSize(true);
|
||||
list.setNestedScrollingEnabled(false);
|
||||
mAdapter.setRecyclerView(list);
|
||||
list.setAdapter(mAdapter);
|
||||
list.setOnTouchListener(this);
|
||||
list.requestFocus();
|
||||
|
||||
mAddLanguage = layout.findViewById(R.id.add_language);
|
||||
mAddLanguage.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016 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.settings.localepicker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
class LocaleRecyclerView extends RecyclerView {
|
||||
public LocaleRecyclerView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LocaleRecyclerView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public LocaleRecyclerView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user