forked from firka/student-legacy
feat: use "custom_background_color" for the lesson elements as well
This commit is contained in:
parent
b2db424d20
commit
de5f347339
@ -53,7 +53,7 @@ public class DBManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Cursor fetchTheme() {
|
public Cursor fetchTheme() {
|
||||||
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.THEME, SQLiteHelper.CUSTOM_ACCENT_COLOR, SQLiteHelper.CUSTOM_HIGHLIGHT_COLOR, SQLiteHelper.CUSTOM_BACKGROUND_COLOR}, null, null, null, null, null);
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.THEME, SQLiteHelper.CUSTOM_ACCENT_COLOR, SQLiteHelper.CUSTOM_BACKGROUND_COLOR}, null, null, null, null, null);
|
||||||
if (cursor != null) {
|
if (cursor != null) {
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@ public class SQLiteHelper extends SQLiteOpenHelper {
|
|||||||
public static final String LOCALE = "language";
|
public static final String LOCALE = "language";
|
||||||
public static final String CUSTOM_ACCENT_COLOR = "custom_accent_color";
|
public static final String CUSTOM_ACCENT_COLOR = "custom_accent_color";
|
||||||
public static final String CUSTOM_BACKGROUND_COLOR = "custom_background_color";
|
public static final String CUSTOM_BACKGROUND_COLOR = "custom_background_color";
|
||||||
public static final String CUSTOM_HIGHLIGHT_COLOR = "custom_highlight_color";
|
|
||||||
public static final String TABLE_NAME_WIDGETS = "widgets";
|
public static final String TABLE_NAME_WIDGETS = "widgets";
|
||||||
public static final String TABLE_NAME_USER_DATA = "user_data";
|
public static final String TABLE_NAME_USER_DATA = "user_data";
|
||||||
public static final String TABLE_NAME_SETTINGS = "settings";
|
public static final String TABLE_NAME_SETTINGS = "settings";
|
||||||
|
@ -112,7 +112,7 @@ public class WidgetTimetable extends HomeWidgetProvider {
|
|||||||
dbManager.close();
|
dbManager.close();
|
||||||
|
|
||||||
int theme = cursor.getInt(0);
|
int theme = cursor.getInt(0);
|
||||||
int customBackgroundColor = cursor.getInt(3);
|
int customBackgroundColor = cursor.getInt(2);
|
||||||
|
|
||||||
return new Integer[]{theme, customBackgroundColor};
|
return new Integer[]{theme, customBackgroundColor};
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -325,9 +325,9 @@ public class WidgetTimetableDataProvider implements RemoteViewsService.RemoteVie
|
|||||||
|
|
||||||
int theme = cursor.getInt(0);
|
int theme = cursor.getInt(0);
|
||||||
int customAccentColor = cursor.getInt(1);
|
int customAccentColor = cursor.getInt(1);
|
||||||
int customHighlightColor = cursor.getInt(2);
|
int customBackgroundColor = cursor.getInt(2);
|
||||||
|
|
||||||
return new Integer[]{theme, customAccentColor, customHighlightColor};
|
return new Integer[]{theme, customAccentColor, customBackgroundColor};
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user