Skip to content

Commit

Permalink
Removed the old urls to just keep support for the new v2 urls
Browse files Browse the repository at this point in the history
  • Loading branch information
galadril committed Feb 13, 2024
1 parent ba1f2b4 commit d6b3383
Show file tree
Hide file tree
Showing 22 changed files with 349 additions and 1,129 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/nl/hnogames/domoticz/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ public void onCancel() {
if (!allUsers.contains(user.getUsername())) {
ProfileDrawerItem profile = new ProfileDrawerItem().withName(user.getRightsValue(this)
).withEmail(user.getUsername())
.withIcon(R.drawable.users)
.withIcon(nl.hnogames.domoticzapi.R.drawable.users)
.withEnabled(user.isEnabled());
allUsers.add(user.getUsername());
headerResult.addProfiles(profile);
Expand Down Expand Up @@ -1499,25 +1499,25 @@ public void onPermissionGranted(@NonNull String[] permissionName) {
super.onPermissionGranted(permissionName);
}

@Shortcut(id = "open_dashboard", icon = R.drawable.generic, shortLabelRes = R.string.title_dashboard, rank = 5, activity = MainActivity.class)
@Shortcut(id = "open_dashboard", icon = nl.hnogames.domoticzapi.R.drawable.generic, shortLabelRes = R.string.title_dashboard, rank = 5, activity = MainActivity.class)
public void OpenDashBoard() {
fromShortcut = true;
changeFragment("nl.hnogames.domoticz.fragments.Dashboard", false);
}

@Shortcut(id = "open_switches", icon = R.drawable.bulb, shortLabelRes = R.string.title_switches, rank = 4, activity = MainActivity.class)
@Shortcut(id = "open_switches", icon = nl.hnogames.domoticzapi.R.drawable.bulb, shortLabelRes = R.string.title_switches, rank = 4, activity = MainActivity.class)
public void OpenSwitch() {
fromShortcut = true;
changeFragment("nl.hnogames.domoticz.fragments.Switches", false);
}

@Shortcut(id = "open_utilities", icon = R.drawable.solar_panel, shortLabelRes = R.string.title_utilities, rank = 3, activity = MainActivity.class)
@Shortcut(id = "open_utilities", icon = nl.hnogames.domoticzapi.R.drawable.solar_panel, shortLabelRes = R.string.title_utilities, rank = 3, activity = MainActivity.class)
public void OpenUtilities() {
fromShortcut = true;
changeFragment("nl.hnogames.domoticz.fragments.Utilities", false);
}

@Shortcut(id = "open_temperature", icon = R.drawable.temperature, shortLabelRes = R.string.title_temperature, rank = 2, activity = MainActivity.class)
@Shortcut(id = "open_temperature", icon = nl.hnogames.domoticzapi.R.drawable.temperature, shortLabelRes = R.string.title_temperature, rank = 2, activity = MainActivity.class)
public void OpenTemperature() {
fromShortcut = true;
changeFragment("nl.hnogames.domoticz.fragments.Temperature", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ private void setTemperatureRowData(DevicesInfo mDeviceInfo, DataObjectHolder hol

holder.pieView.setPercentageBackgroundColor(ContextCompat.getColor(context, R.color.material_orange_600));
if ((sign.equals("C") && temperature < 0) || (sign.equals("F") && temperature < 30)) {
holder.pieView.setPercentageBackgroundColor(R.color.md_red_600);
holder.pieView.setPercentageBackgroundColor(com.mikepenz.materialize.R.color.md_red_600);
}

if (!mSharedPrefs.getAutoRefresh()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void onClick(View v) {
}
}

Picasso.get().load(R.drawable.power).into(holder.iconRow);
Picasso.get().load(nl.hnogames.domoticzapi.R.drawable.power).into(holder.iconRow);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ public void onBindViewHolder(final DataObjectHolder holder, int position) {
holder.message.setText(message);

if (mLogInfo.getLevel() == 4)
Picasso.get().load(R.drawable.power).into(holder.iconRow);
Picasso.get().load(nl.hnogames.domoticzapi.R.drawable.power).into(holder.iconRow);
else if (mLogInfo.getLevel() == 2)
Picasso.get().load(R.drawable.power).into(holder.iconRow);
Picasso.get().load(nl.hnogames.domoticzapi.R.drawable.power).into(holder.iconRow);
else
Picasso.get().load(R.drawable.power).into(holder.iconRow);
Picasso.get().load(nl.hnogames.domoticzapi.R.drawable.power).into(holder.iconRow);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void onClick(View view) {
}
});

Picasso.get().load(R.drawable.power).into(holder.iconRow);
Picasso.get().load(nl.hnogames.domoticzapi.R.drawable.power).into(holder.iconRow);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ private void setDefaultRowData(DevicesInfo mDeviceInfo,
}

if (mDeviceInfo.getIdx() == iVoiceAction) {
Picasso.get().load(R.drawable.mic).into(holder.iconRow);
Picasso.get().load(nl.hnogames.domoticzapi.R.drawable.mic).into(holder.iconRow);
} else if (mDeviceInfo.getIdx() == iQRCodeAction) {
Picasso.get().load(R.drawable.qrcode).into(holder.iconRow);
Picasso.get().load(nl.hnogames.domoticzapi.R.drawable.qrcode).into(holder.iconRow);
} else {
Picasso.get().load(DomoticzIcons.getDrawableIcon(mDeviceInfo.getTypeImg(),
mDeviceInfo.getType(),
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/java/nl/hnogames/domoticz/fragments/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -484,16 +484,16 @@ private LineData generateData(View view) {
if (addTemperatureRange) {
dataSet = new LineDataSet(valuestMax, "Max"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setColor(ContextCompat.getColor(context, com.mikepenz.materialize.R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
dataSet.setDrawFilled(true);
dataSet.setFillColor(R.color.md_blue_300);
dataSet.setFillColor(com.mikepenz.materialize.R.color.md_blue_300);
entries.add(dataSet);

dataSet = new LineDataSet(valuestMin, "Min"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setColor(ContextCompat.getColor(context, com.mikepenz.materialize.R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
dataSet.setFillAlpha(255);
Expand Down Expand Up @@ -564,16 +564,16 @@ private LineData generateData(View view) {
if (addPercentageRange) {
dataSet = new LineDataSet(valuesvMax, "Max"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setColor(ContextCompat.getColor(context, com.mikepenz.materialize.R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
dataSet.setDrawFilled(true);
dataSet.setFillColor(R.color.md_blue_300);
dataSet.setFillColor(com.mikepenz.materialize.R.color.md_blue_300);
entries.add(dataSet);

dataSet = new LineDataSet(valuesvMin, "Min"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setColor(ContextCompat.getColor(context, com.mikepenz.materialize.R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
dataSet.setFillAlpha(255);
Expand Down Expand Up @@ -666,7 +666,7 @@ private LineData generateData(View view) {
if ((addCO2Max && !enableFilters) ||
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_co2max)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesco2max, ((TextView) view.findViewById(R.id.legend_co2max)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.md_red_400));
dataSet.setColor(ContextCompat.getColor(context, com.mikepenz.materialize.R.color.md_red_400));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
Expand Down Expand Up @@ -696,7 +696,7 @@ private LineData generateData(View view) {
if ((addLuxMax && !enableFilters) ||
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_Luxmax)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesLuxmax, ((TextView) view.findViewById(R.id.legend_Luxmax)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.md_red_400));
dataSet.setColor(ContextCompat.getColor(context, com.mikepenz.materialize.R.color.md_red_400));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
Expand All @@ -706,7 +706,7 @@ private LineData generateData(View view) {
if ((addLuxAvg && !enableFilters) ||
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_LuxAvg)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesLuxAvg, ((TextView) view.findViewById(R.id.legend_LuxAvg)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.md_yellow_400));
dataSet.setColor(ContextCompat.getColor(context, com.mikepenz.materialize.R.color.md_yellow_400));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
Expand Down
Loading

0 comments on commit d6b3383

Please sign in to comment.