Java Code Examples for org.telegram.tgnet.ConnectionsManager#ConnectionStateWaitingForNetwork
The following examples show how to use
org.telegram.tgnet.ConnectionsManager#ConnectionStateWaitingForNetwork .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChatAvatarContainer.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
private void updateCurrentConnectionState() { String title = null; if (currentConnectionState == ConnectionsManager.ConnectionStateWaitingForNetwork) { title = LocaleController.getString("WaitingForNetwork", R.string.WaitingForNetwork); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnecting) { title = LocaleController.getString("Connecting", R.string.Connecting); } else if (currentConnectionState == ConnectionsManager.ConnectionStateUpdating) { title = LocaleController.getString("Updating", R.string.Updating); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnectingToProxy) { title = LocaleController.getString("ConnectingToProxy", R.string.ConnectingToProxy); } if (title == null) { if (lastSubtitle != null) { subtitleTextView.setText(lastSubtitle); lastSubtitle = null; } } else { lastSubtitle = subtitleTextView.getText(); subtitleTextView.setText(title); } }
Example 2
Source File: ChatAvatarContainer.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
private void updateCurrentConnectionState() { String title = null; if (currentConnectionState == ConnectionsManager.ConnectionStateWaitingForNetwork) { title = LocaleController.getString("WaitingForNetwork", R.string.WaitingForNetwork); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnecting) { title = LocaleController.getString("Connecting", R.string.Connecting); } else if (currentConnectionState == ConnectionsManager.ConnectionStateUpdating) { title = LocaleController.getString("Updating", R.string.Updating); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnectingToProxy) { title = LocaleController.getString("ConnectingToProxy", R.string.ConnectingToProxy); } if (title == null) { if (lastSubtitle != null) { subtitleTextView.setText(lastSubtitle); lastSubtitle = null; } } else { lastSubtitle = subtitleTextView.getText(); subtitleTextView.setText(title); } }
Example 3
Source File: ChatAvatarContainer.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private void updateCurrentConnectionState() { String title = null; if (currentConnectionState == ConnectionsManager.ConnectionStateWaitingForNetwork) { title = LocaleController.getString("WaitingForNetwork", R.string.WaitingForNetwork); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnecting) { title = LocaleController.getString("Connecting", R.string.Connecting); } else if (currentConnectionState == ConnectionsManager.ConnectionStateUpdating) { title = LocaleController.getString("Updating", R.string.Updating); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnectingToProxy) { title = LocaleController.getString("ConnectingToProxy", R.string.ConnectingToProxy); } if (title == null) { if (lastSubtitle != null) { subtitleTextView.setText(lastSubtitle); lastSubtitle = null; if (lastSubtitleColorKey != null) { subtitleTextView.setTextColor(Theme.getColor(lastSubtitleColorKey)); subtitleTextView.setTag(lastSubtitleColorKey); } } } else { if (lastSubtitle == null) { lastSubtitle = subtitleTextView.getText(); } subtitleTextView.setText(title); subtitleTextView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSubtitle)); subtitleTextView.setTag(Theme.key_actionBarDefaultSubtitle); } }
Example 4
Source File: ChatAvatarContainer.java From Telegram with GNU General Public License v2.0 | 5 votes |
private void updateCurrentConnectionState() { String title = null; if (currentConnectionState == ConnectionsManager.ConnectionStateWaitingForNetwork) { title = LocaleController.getString("WaitingForNetwork", R.string.WaitingForNetwork); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnecting) { title = LocaleController.getString("Connecting", R.string.Connecting); } else if (currentConnectionState == ConnectionsManager.ConnectionStateUpdating) { title = LocaleController.getString("Updating", R.string.Updating); } else if (currentConnectionState == ConnectionsManager.ConnectionStateConnectingToProxy) { title = LocaleController.getString("ConnectingToProxy", R.string.ConnectingToProxy); } if (title == null) { if (lastSubtitle != null) { subtitleTextView.setText(lastSubtitle); lastSubtitle = null; if (lastSubtitleColorKey != null) { subtitleTextView.setTextColor(Theme.getColor(lastSubtitleColorKey)); subtitleTextView.setTag(lastSubtitleColorKey); } } } else { if (lastSubtitle == null) { lastSubtitle = subtitleTextView.getText(); } subtitleTextView.setText(title); subtitleTextView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSubtitle)); subtitleTextView.setTag(Theme.key_actionBarDefaultSubtitle); } }