Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/alpha-development' …
Browse files Browse the repository at this point in the history
…into beta-development
  • Loading branch information
galadril committed Jun 13, 2017
2 parents 74497a2 + f80417f commit e94fee8
Show file tree
Hide file tree
Showing 96 changed files with 2,568 additions and 2,521 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void setOnItemClickListener(onClickListener onClickListener) {
@Override
public DataObjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.camera_row, parent, false);
.inflate(R.layout.camera_row, parent, false);

if (mSharedPrefs.darkThemeEnabled()) {
((android.support.v7.widget.CardView) view.findViewById(R.id.row_global_wrapper)).setCardBackgroundColor(Color.parseColor("#3F3F3F"));
Expand Down Expand Up @@ -99,7 +99,7 @@ public interface onClickListener {
}

public static class DataObjectHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
implements View.OnClickListener {
TextView name;
nl.hnogames.domoticz.UI.MjpegViewer.MjpegView camera;

Expand Down
266 changes: 133 additions & 133 deletions app/src/main/java/nl/hnogames/domoticz/Adapters/DashboardAdapter.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Filter getFilter() {
@Override
public DataObjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.event_row_default, parent, false);
.inflate(R.layout.event_row_default, parent, false);

if (mSharedPrefs.darkThemeEnabled()) {
((android.support.v7.widget.CardView) view.findViewById(R.id.card_global_wrapper)).setCardBackgroundColor(Color.parseColor("#3F3F3F"));
Expand Down Expand Up @@ -147,7 +147,7 @@ public interface onClickListener {
}

public static class DataObjectHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
implements View.OnClickListener {
TextView name;
TextView message;
Switch buttonON;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
holder.connectedSwitch.setText(context.getString(R.string.connectedSwitch) + ": " + mLocationInfo.getSwitchIdx());
} else {
holder.connectedSwitch.setText(context.getString(R.string.connectedSwitch)
+ ": " + context.getString(R.string.not_available));
+ ": " + context.getString(R.string.not_available));
}

if (!UsefulBits.isEmpty(mLocationInfo.getValue()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Filter getFilter() {
@Override
public DataObjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.logs_row_default, parent, false);
.inflate(R.layout.logs_row_default, parent, false);


if (mSharedPrefs.darkThemeEnabled()) {
Expand Down Expand Up @@ -132,7 +132,7 @@ public interface onClickListener {


public static class DataObjectHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
implements View.OnClickListener {
TextView name;
TextView datetime;
TextView message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
holder.nfc_switch_idx.setText(context.getString(R.string.connectedSwitch) + ": " + mNFCInfo.getSwitchIdx());
} else {
holder.nfc_switch_idx.setText(context.getString(R.string.connectedSwitch)
+ ": " + context.getString(R.string.not_available));
+ ": " + context.getString(R.string.not_available));
}

if (!UsefulBits.isEmpty(mNFCInfo.getValue()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void setData(ArrayList<PlanInfo> data) {
@Override
public DataObjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.plan_row, parent, false);
.inflate(R.layout.plan_row, parent, false);

if (mSharedPrefs.darkThemeEnabled()) {
((android.support.v7.widget.CardView) view.findViewById(R.id.row_global_wrapper)).setCardBackgroundColor(Color.parseColor("#3F3F3F"));
Expand Down Expand Up @@ -91,7 +91,7 @@ public interface onClickListener {
}

public static class DataObjectHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
implements View.OnClickListener {
TextView name;
TextView devices;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
holder.nfc_switch_idx.setText(context.getString(R.string.connectedSwitch) + ": " + mQRCodeInfo.getSwitchIdx());
} else {
holder.nfc_switch_idx.setText(context.getString(R.string.connectedSwitch)
+ ": " + context.getString(R.string.not_available));
+ ": " + context.getString(R.string.not_available));
}

if (!UsefulBits.isEmpty(mQRCodeInfo.getValue()))
Expand Down
40 changes: 20 additions & 20 deletions app/src/main/java/nl/hnogames/domoticz/Adapters/SceneAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public Filter getFilter() {
@Override
public DataObjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.scene_row_default, parent, false);
.inflate(R.layout.scene_row_default, parent, false);

if (mSharedPrefs.darkThemeEnabled()) {
((android.support.v7.widget.CardView) view.findViewById(R.id.card_global_wrapper)).setCardBackgroundColor(Color.parseColor("#3F3F3F"));
Expand Down Expand Up @@ -141,19 +141,19 @@ public void onBindViewHolder(final DataObjectHolder holder, final int position)

holder.switch_name.setText(mSceneInfo.getName());
String text = context.getString(R.string.last_update)
+ ": "
+ UsefulBits.getFormattedDate(context,
mSceneInfo.getLastUpdateDateTime().getTime());
+ ": "
+ UsefulBits.getFormattedDate(context,
mSceneInfo.getLastUpdateDateTime().getTime());
holder.signal_level.setText(text);
holder.switch_battery_level.setText(DomoticzValues.Scene.Type.SCENE);

Picasso.with(context).load(DomoticzIcons.getDrawableIcon(
DomoticzValues.Scene.Type.SCENE.toLowerCase(),
null,
null,
false,
false,
null)).into(holder.iconRow);
DomoticzValues.Scene.Type.SCENE.toLowerCase(),
null,
null,
false,
false,
null)).into(holder.iconRow);

if (holder.buttonOn != null) {
holder.buttonOn.setId(mSceneInfo.getIdx());
Expand Down Expand Up @@ -218,9 +218,9 @@ public void onClick(View v) {
holder.switch_name.setText(mSceneInfo.getName());

String text = context.getString(R.string.last_update)
+ ": "
+ UsefulBits.getFormattedDate(context,
mSceneInfo.getLastUpdateDateTime().getTime());
+ ": "
+ UsefulBits.getFormattedDate(context,
mSceneInfo.getLastUpdateDateTime().getTime());

holder.signal_level.setText(text);
holder.switch_battery_level.setText(DomoticzValues.Scene.Type.GROUP);
Expand All @@ -245,12 +245,12 @@ public void onClick(View v) {
}

Picasso.with(context).load(DomoticzIcons.getDrawableIcon(
DomoticzValues.Scene.Type.GROUP.toLowerCase(),
null,
null,
mSceneInfo.getStatusInBoolean(),
false,
null)).into(holder.iconRow);
DomoticzValues.Scene.Type.GROUP.toLowerCase(),
null,
null,
mSceneInfo.getStatusInBoolean(),
false,
null)).into(holder.iconRow);

if (!mSceneInfo.getStatusInBoolean())
holder.iconRow.setAlpha(0.5f);
Expand Down Expand Up @@ -282,7 +282,7 @@ public void onClick(View v) {
});
}
} else throw new NullPointerException("Scene type not supported in the adapter for:\n"
+ mSceneInfo.toString());
+ mSceneInfo.toString());

holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ public View getView(int position, View convertView, ViewGroup parent) {
holder.Speech_tag_id.setText(context.getString(R.string.connectedSwitch) + ": " + mSpeechInfo.getSwitchIdx());
} else {
holder.Speech_tag_id.setText(context.getString(R.string.connectedSwitch)
+ ": " + context.getString(R.string.not_available));
+ ": " + context.getString(R.string.not_available));
}

if (!UsefulBits.isEmpty(mSpeechInfo.getValue()))
holder.Speech_tag_id.setText(holder.Speech_tag_id.getText() + " - " + mSpeechInfo.getValue());

holder.Speech_switch_idx.setText("Commando's: \r\n" + "'" + mSpeechInfo.getName() + "' " + "\r\n'" + mSpeechInfo.getName() + " " + context.getString(R.string.button_state_on).toLowerCase() + "'\r\n" +
"'" + mSpeechInfo.getName() + " " + context.getString(R.string.button_state_off).toLowerCase() + "'");
"'" + mSpeechInfo.getName() + " " + context.getString(R.string.button_state_off).toLowerCase() + "'");

holder.remove.setId(position);
holder.remove.setOnClickListener(new View.OnClickListener() {
Expand Down
Loading

0 comments on commit e94fee8

Please sign in to comment.