aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/org/connectbot/HostListActivity.java
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-09-11 10:49:27 -0700
committerKenny Root <kenny@the-b.org>2015-09-11 10:49:27 -0700
commit4e8fc54f25b61db74948d99c8fc4c233e0b2f946 (patch)
tree8be4c1cf5199957156d7fac1505b5f23891decca /app/src/main/java/org/connectbot/HostListActivity.java
parent0f5b1ec4c7f5a2cfa11f2748abacfcb09923a9e9 (diff)
parentc72b30a01295ca0a9a453618f71f55afedd62009 (diff)
downloadconnectbot-4e8fc54f25b61db74948d99c8fc4c233e0b2f946.tar.gz
connectbot-4e8fc54f25b61db74948d99c8fc4c233e0b2f946.tar.bz2
connectbot-4e8fc54f25b61db74948d99c8fc4c233e0b2f946.zip
Merge branch 'master' into database-refactor
Diffstat (limited to 'app/src/main/java/org/connectbot/HostListActivity.java')
-rw-r--r--app/src/main/java/org/connectbot/HostListActivity.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/app/src/main/java/org/connectbot/HostListActivity.java b/app/src/main/java/org/connectbot/HostListActivity.java
index 7a4c334..c95769c 100644
--- a/app/src/main/java/org/connectbot/HostListActivity.java
+++ b/app/src/main/java/org/connectbot/HostListActivity.java
@@ -37,7 +37,6 @@ import android.content.Intent.ShortcutIconResource;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
-import android.content.res.ColorStateList;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
@@ -505,7 +504,7 @@ public class HostListActivity extends ListActivity implements OnHostStatusChange
private final LayoutInflater inflater;
private final List<HostBean> hosts;
private final TerminalManager manager;
- private final ColorStateList red, green, blue;
+ private final Context context;
public final static int STATE_UNKNOWN = 1, STATE_CONNECTED = 2, STATE_DISCONNECTED = 3;
@@ -516,13 +515,10 @@ public class HostListActivity extends ListActivity implements OnHostStatusChange
}
public HostAdapter(Context context, List<HostBean> hosts, TerminalManager manager) {
- this.inflater = LayoutInflater.from(context);
+ this.context = context;
this.hosts = hosts;
this.manager = manager;
-
- red = context.getResources().getColorStateList(R.color.red);
- green = context.getResources().getColorStateList(R.color.green);
- blue = context.getResources().getColorStateList(R.color.blue);
+ this.inflater = LayoutInflater.from(context);
}
/**
@@ -626,8 +622,8 @@ public class HostListActivity extends ListActivity implements OnHostStatusChange
chosenStyleSecondLine = R.style.ListItemSecondLineText;
}
- holder.nickname.setTextAppearance(chosenStyleFirstLine);
- holder.caption.setTextAppearance(chosenStyleSecondLine);
+ holder.nickname.setTextAppearance(context, chosenStyleFirstLine);
+ holder.caption.setTextAppearance(context, chosenStyleSecondLine);
Context context = convertView.getContext();
CharSequence nice = context.getString(R.string.bind_never);