Loading packages/SettingsLib/MainSwitchPreference/src/com/android/settingslib/widget/MainSwitchBar.java +6 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ public class MainSwitchBar extends LinearLayout implements CompoundButton.OnChec int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); LayoutInflater.from(context).inflate(R.layout.main_switch_bar, this); LayoutInflater.from(context).inflate(resourceId(context, "layout", "main_switch_bar"), this); setFocusable(true); setClickable(true); Loading Loading @@ -255,4 +256,8 @@ public class MainSwitchBar extends LinearLayout implements CompoundButton.OnChec requestLayout(); } private int resourceId(Context context, String type, String name) { return context.getResources().getIdentifier(name, type, context.getPackageName()); } } Loading
packages/SettingsLib/MainSwitchPreference/src/com/android/settingslib/widget/MainSwitchBar.java +6 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ public class MainSwitchBar extends LinearLayout implements CompoundButton.OnChec int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); LayoutInflater.from(context).inflate(R.layout.main_switch_bar, this); LayoutInflater.from(context).inflate(resourceId(context, "layout", "main_switch_bar"), this); setFocusable(true); setClickable(true); Loading Loading @@ -255,4 +256,8 @@ public class MainSwitchBar extends LinearLayout implements CompoundButton.OnChec requestLayout(); } private int resourceId(Context context, String type, String name) { return context.getResources().getIdentifier(name, type, context.getPackageName()); } }