diff options
| author | Kenny Root <kenny@the-b.org> | 2015-09-11 10:41:26 -0700 | 
|---|---|---|
| committer | Kenny Root <kenny@the-b.org> | 2015-09-11 10:41:26 -0700 | 
| commit | c72b30a01295ca0a9a453618f71f55afedd62009 (patch) | |
| tree | 82b69393071fc592248b3bc8a63796bcc902758b /app/src | |
| parent | 4d71d839022b6d926e6d102f431116d91c73ef4e (diff) | |
| parent | 66f37d57ec17f86cd56c256deca3b4f93872d350 (diff) | |
| download | connectbot-c72b30a01295ca0a9a453618f71f55afedd62009.tar.gz connectbot-c72b30a01295ca0a9a453618f71f55afedd62009.tar.bz2 connectbot-c72b30a01295ca0a9a453618f71f55afedd62009.zip  | |
Merge pull request #196 from kruton/context-style
Go back to old context-using setTextAppearance call
Diffstat (limited to 'app/src')
| -rw-r--r-- | app/src/main/java/org/connectbot/HostListActivity.java | 14 | 
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 0e6fa3e..ce8c79b 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; @@ -516,7 +515,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; @@ -527,13 +526,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);  		}  		/** @@ -637,8 +633,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);  | 
