This repository was archived by the owner on Apr 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-22
lines changed
term/src/main/java/jackpal/androidterm Expand file tree Collapse file tree 4 files changed +12
-22
lines changed Original file line number Diff line number Diff line change @@ -345,16 +345,18 @@ public void onCreate(Bundle icicle) {
345
345
Log .w (TermDebug .LOG_TAG , "bind to service failed!" );
346
346
}
347
347
348
- if (AndroidCompat .V11ToV20 ) {
348
+ if (AndroidCompat .SDK >= 11 ) {
349
349
int actionBarMode = mSettings .actionBarMode ();
350
350
mActionBarMode = actionBarMode ;
351
- switch (actionBarMode ) {
352
- case TermSettings .ACTION_BAR_MODE_ALWAYS_VISIBLE :
353
- setTheme (R .style .Theme_Holo );
354
- break ;
355
- case TermSettings .ACTION_BAR_MODE_HIDES :
356
- setTheme (R .style .Theme_Holo_ActionBarOverlay );
357
- break ;
351
+ if (AndroidCompat .V11ToV20 ) {
352
+ switch (actionBarMode ) {
353
+ case TermSettings .ACTION_BAR_MODE_ALWAYS_VISIBLE :
354
+ setTheme (R .style .Theme_Holo );
355
+ break ;
356
+ case TermSettings .ACTION_BAR_MODE_HIDES :
357
+ setTheme (R .style .Theme_Holo_ActionBarOverlay );
358
+ break ;
359
+ }
358
360
}
359
361
} else {
360
362
mActionBarMode = TermSettings .ACTION_BAR_MODE_ALWAYS_VISIBLE ;
Original file line number Diff line number Diff line change @@ -36,9 +36,8 @@ protected void onCreate(Bundle savedInstanceState) {
36
36
// Load the preferences from an XML resource
37
37
addPreferencesFromResource (R .xml .preferences );
38
38
39
- // Remove the action bar pref on non-Holo platforms.
40
- // On pre and post holo platforms there is no action bar.
41
- if (!AndroidCompat .V11ToV20 ) {
39
+ // Remove the action bar pref on older platforms without an action bar
40
+ if (AndroidCompat .SDK < 11 ) {
42
41
Preference actionBarPref = findPreference (ACTIONBAR_KEY );
43
42
PreferenceCategory screenCategory =
44
43
(PreferenceCategory ) findPreference (CATEGORY_SCREEN_KEY );
Original file line number Diff line number Diff line change @@ -23,13 +23,6 @@ public class AndroidCompat {
23
23
V11ToV20 = (SDK >= 11 ) && (SDK <= 20 );
24
24
}
25
25
26
- // The era of Material Design
27
- public final static boolean V21Up ;
28
-
29
- static {
30
- V21Up = SDK >= 21 ;
31
- }
32
-
33
26
private final static int getSDK () {
34
27
int result ;
35
28
try {
Original file line number Diff line number Diff line change @@ -188,10 +188,6 @@ public void readPrefs(SharedPreferences prefs) {
188
188
mPrefs = prefs ;
189
189
mStatusBar = readIntPref (STATUSBAR_KEY , mStatusBar , 1 );
190
190
mActionBarMode = readIntPref (ACTIONBAR_KEY , mActionBarMode , ACTION_BAR_MODE_MAX );
191
- if (AndroidCompat .V21Up ) {
192
- // ActionBar replaced by Taskbar in Material Design. TODO: Implement scroll hiding.
193
- mActionBarMode = ACTION_BAR_MODE_ALWAYS_VISIBLE ;
194
- }
195
191
mOrientation = readIntPref (ORIENTATION_KEY , mOrientation , 2 );
196
192
// mCursorStyle = readIntPref(CURSORSTYLE_KEY, mCursorStyle, 2);
197
193
// mCursorBlink = readIntPref(CURSORBLINK_KEY, mCursorBlink, 1);
You can’t perform that action at this time.
0 commit comments