Skip to content

Commit

Permalink
Players, RAM and CPU ussage is hiden when server is off
Browse files Browse the repository at this point in the history
  • Loading branch information
sashaqwert committed Nov 18, 2019
1 parent 9b4ea05 commit 8887bbd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/java/ru/sccraft/arenacontrol/ServerActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import android.widget.ListView
import android.widget.ProgressBar
import android.widget.TextView
import android.widget.Toast
import android.widget.LinearLayout

import com.google.android.gms.ads.AdView

Expand Down Expand Up @@ -282,6 +283,9 @@ class ServerActivity : ADsActivity() {

val ожидание_ответа_от_сервера = rootView!!.findViewById<ProgressBar>(R.id.res_pleaseWait)

//Layout для скрытия ненужных индикаторов при выключенном сервере
val ЦП_ОЗУ_игроки = rootView!!.findViewById<LinearLayout>(R.id.res_starting_or_running)

//Кнопки включения / выключения / перезагрузки сервера
val включить = rootView!!.findViewById<Button>(R.id.res_start)
val выключить = rootView!!.findViewById<Button>(R.id.res_stop)
Expand All @@ -290,6 +294,7 @@ class ServerActivity : ADsActivity() {

if (s.сервер!!.статус.toInt() == 0) {
включить.visibility = View.VISIBLE
ЦП_ОЗУ_игроки.visibility = View.GONE
} else {
включить.visibility = View.GONE
}
Expand All @@ -310,6 +315,7 @@ class ServerActivity : ADsActivity() {
}
if (s.сервер!!.статус.toInt() != 0) {
выключить.visibility = View.VISIBLE
ЦП_ОЗУ_игроки.visibility = View.VISIBLE
} else {
выключить.visibility = View.GONE
}
Expand Down

0 comments on commit 8887bbd

Please sign in to comment.