Compare commits
29 Commits
9d750fc6a3
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| f51351f291 | |||
| 6ea173b423 | |||
| 410ad1139a | |||
| 957e06833f | |||
| bfef557d60 | |||
| 2c355d1898 | |||
| d1b23716c3 | |||
| 0c816b4870 | |||
| 0b9a3c318b | |||
| 00e1d2293e | |||
| aef576f893 | |||
| 5dfe30948b | |||
| 78c688a006 | |||
| c935e299bc | |||
| e916f1012b | |||
| b805095d82 | |||
| 25b433be42 | |||
| 0b52b1c995 | |||
| 1da522d469 | |||
| 8a67c49668 | |||
| 1a4fa304da | |||
| 2e0893bac4 | |||
| e2e18c7818 | |||
| 23c47245b8 | |||
| 192e564f02 | |||
| 930ae8eafb | |||
| d9b2711209 | |||
| dd9adf335e | |||
| 9ee46b8f86 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/app
|
||||
/local.properties
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
|
||||
6
.idea/AndroidProjectSystem.xml
generated
Normal file
6
.idea/AndroidProjectSystem.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AndroidProjectSystem">
|
||||
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
|
||||
</component>
|
||||
</project>
|
||||
1005
.idea/caches/deviceStreaming.xml
generated
1005
.idea/caches/deviceStreaming.xml
generated
File diff suppressed because it is too large
Load Diff
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@ -28,6 +28,7 @@
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
|
||||
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="svn" />
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -1,6 +1,13 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
|
||||
bundle {
|
||||
language {
|
||||
enableSplit = false
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
config {
|
||||
keyAlias 'ASDC'
|
||||
@ -13,9 +20,9 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "kz.istt.locust"
|
||||
minSdkVersion 15
|
||||
versionCode 110
|
||||
versionName "3.0.7"
|
||||
targetSdkVersion 34
|
||||
versionCode 115
|
||||
versionName "3.0.11"
|
||||
targetSdkVersion 35
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
}
|
||||
@ -39,7 +46,7 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
namespace 'kz.istt.locust'
|
||||
compileSdk 34
|
||||
compileSdk 35
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@ -26,7 +26,7 @@ import tctable.TCTable;
|
||||
|
||||
public class DbOpenHelper extends SQLiteOpenHelper
|
||||
{
|
||||
private static final int DB_VERSION = 153; //Версия ожидаемой базы
|
||||
private static final int DB_VERSION = 154; //Версия ожидаемой базы
|
||||
private static final String DB_NAME = "Locust"; //Наименование базы
|
||||
|
||||
//ArrayList<String> lrFrmLocust = new ArrayList<String>(); //Список обязательных полей для формы саранцчи
|
||||
@ -687,7 +687,8 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
||||
"spray_marking_id boolean," + //Наземная маркировка(Сиг-нальщики, GPS, Машина, Нет)
|
||||
|
||||
"efficiency boolean NOT NULL DEFAULT 0," + //For CheckBox
|
||||
"efficacy_impact_id integer," + //Тип оцениваемого биологического воздействия
|
||||
"efficacy_impact_id integer," + //Тип оцениваемого биологического воздействия (TODO потом удалить)
|
||||
"efficacy_impact text," + //Тип оцениваемого биологического воздействия (множественный выбор)
|
||||
"efficacy_mortality float," + //смертность саранчи(%)
|
||||
"efficacy_passed_time float," + //Прошло времени после обработки
|
||||
"efficacy_mortality_method integer," + //метод подсчета смертности
|
||||
@ -765,7 +766,8 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
||||
|
||||
// Контроль эффективности
|
||||
"efficacy_control boolean," + // Проведен ли контроль эффективности (бригада мониторинга)?
|
||||
"efficacy_impact_type_id integer," + // Тип оцениваемого биологического воздействия
|
||||
"efficacy_impact_type_id integer," + // Тип оцениваемого биологического воздействия (TODO удалить)
|
||||
"efficacy_impact_type text," + // Тип оцениваемого биологического воздействия (множественный выбор)
|
||||
"efficacy_mortality float," + // Наблюдаемая эффективность обработки (%)
|
||||
"efficacy_passed_time float," + // Прошло времени после обработки
|
||||
"efficacy_mortality_method_id integer," + // Метод оценки эффективности обработки (выбор: подсчет квадратов; подсчет по разрезам; подсчет кулиг личинок; другое)
|
||||
@ -899,622 +901,18 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
||||
{
|
||||
//В SQLIte можно только добавить столбец либо переименовать таблицу https://sqlite.org/lang_altertable.html поэтому обновление усложняется....
|
||||
String sql;
|
||||
|
||||
//if(oldVersion==152 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { //Для "RENAME COLUMN" Версия андроида должнв быть выше Android 11
|
||||
/*
|
||||
if(oldVersion==144)
|
||||
{
|
||||
sql = "create table if not exists frmlocustdel_new(" +
|
||||
"id integer,uid text NOT NULL,del boolean NOT NULL DEFAULT 0,seq integer NOT NULL DEFAULT 1,send boolean NOT NULL DEFAULT 0,filled boolean,device_id text,user_id integer," +
|
||||
"image_name1 text," +
|
||||
"image_send1 boolean NOT NULL DEFAULT 0," +
|
||||
"image_name2 text," +
|
||||
"image_send2 boolean NOT NULL DEFAULT 0," +
|
||||
"image_name3 text," +
|
||||
"image_send3 boolean NOT NULL DEFAULT 0," +
|
||||
"country_id integer," +
|
||||
"region_id integer," +
|
||||
"area text," +
|
||||
"district text, " +
|
||||
"village text, " +
|
||||
"terrain text, " +
|
||||
"observer text, " +
|
||||
"date integer," +
|
||||
"lat_center double, " +
|
||||
"lon_center double, " +
|
||||
"lat1 double, " +
|
||||
"lon1 double, " +
|
||||
"lat2 double, " +
|
||||
"lon2 double, " +
|
||||
"lat3 double, " +
|
||||
"lon3 double, " +
|
||||
"lat4 double, " +
|
||||
"lon4 double, " +
|
||||
"lat5 double, " +
|
||||
"lon5 double, " +
|
||||
"lat6 double, " +
|
||||
"lon6 double, " +
|
||||
"infested_area double," +
|
||||
"treated_area double," +
|
||||
"vegetation_type_id integer," +
|
||||
"vegetation_height float," +
|
||||
"vegetation_crop text," +
|
||||
"vegetation_cover_id integer," +
|
||||
"vegetation_damage integer," +
|
||||
"vegetation_damage_area double," +
|
||||
"insecticide_name text," +
|
||||
"insecticide_active_substance text," +
|
||||
"insecticide_concentration text," +
|
||||
"insecticide_formulation_id integer," +
|
||||
"insecticide_dose float," +
|
||||
"insecticide_rate float," +
|
||||
"insecticide_used_volume float," +
|
||||
"insecticide_number_spores float," +
|
||||
"insecticide_expiry_date integer," +
|
||||
"insecticide_mixed text," +
|
||||
"insecticide_mixed_name text," +
|
||||
"insecticide_mixed_ratio float," +
|
||||
"weather_time_start float," +
|
||||
"weather_time_end float," +
|
||||
"weather_temperature_start float," +
|
||||
"weather_temperature_end float," +
|
||||
"weather_humidity_start float," + //Удалили согласно заданию на 2024год
|
||||
"weather_humidity_end float," + //Удалили согласно заданию на 2024год
|
||||
"weather_wind_speed_start float," +
|
||||
"weather_wind_speed_end float," +
|
||||
"weather_direction_start integer," +
|
||||
"weather_direction_end integer," +
|
||||
"weather_spray_direction_start integer," +
|
||||
"weather_spray_direction_end integer," +
|
||||
"locust_type_id integer," +
|
||||
"locust_hoppers_id integer," +
|
||||
"locust_imago boolean," +
|
||||
"locust_density float," +
|
||||
"locust_kuliguli boolean," +
|
||||
"locust_swarm boolean," +
|
||||
"locust_sparse boolean," +
|
||||
"locust_phase_id integer," +
|
||||
"spray_platform integer," +
|
||||
"spray_platform_a integer," +
|
||||
"spray_platform_g integer," +
|
||||
"spray_platform_h integer," +
|
||||
"spray_capacity_id integer," + //Сказали удалить удалил
|
||||
"spray_operatortype_id integer," +
|
||||
"spray_manufacturer_name text," +
|
||||
"spray_model_name text," +
|
||||
"spray_height float," +
|
||||
"spray_width float," +
|
||||
"spray_barrier boolean," +
|
||||
"spray_barrier_width float," + //В 2024 сказали убрать, теперь не используется
|
||||
"spray_barrier_space float," +
|
||||
"spray_speed float," +
|
||||
"spray_gps boolean," +
|
||||
"spray_marking_id boolean," +
|
||||
"efficacy_mortality float," +
|
||||
"efficacy_passed_time float," +
|
||||
"efficacy_mortality_method integer," +
|
||||
"safety_clothing text," +
|
||||
"safety_clothing_clean boolean," +
|
||||
"safety_operator_health boolean," +
|
||||
"description text," +
|
||||
"safety_inform text," +
|
||||
"safety_container_id integer," +
|
||||
"safety_non_target boolean," +
|
||||
"safety_non_target_effect text," +
|
||||
"safety_incident boolean," +
|
||||
"safety_incident_effect text," +
|
||||
"comments text" +
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
//Копирую данные из одной таблицы в другую
|
||||
db.execSQL("INSERT INTO frmlocustdel_new SELECT * FROM frmlocustdel;");
|
||||
db.execSQL("DROP TABLE IF EXISTS frmlocustdel;");
|
||||
db.execSQL("ALTER TABLE frmlocustdel_new RENAME TO frmlocustdel;");
|
||||
if(oldVersion==153) {
|
||||
|
||||
//We converted the version of the database to version 145.
|
||||
oldVersion=145;
|
||||
db.execSQL("ALTER TABLE frmlocustdel ADD COLUMN efficacy_impact TEXT;");
|
||||
db.execSQL("UPDATE frmlocustdel SET efficacy_impact = efficacy_impact_id;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN efficacy_impact_type TEXT;");
|
||||
db.execSQL("UPDATE frmlocusthealth SET efficacy_impact_type = efficacy_impact_type_id;");
|
||||
|
||||
oldVersion=154;
|
||||
}
|
||||
if(oldVersion==145)
|
||||
{
|
||||
//Добвилось поле safety_container для frmlocustdel
|
||||
sql = "ALTER TABLE frmlocustdel ADD safety_container text;";
|
||||
db.execSQL(sql);
|
||||
sql = "UPDATE frmlocustdel set safety_container=safety_container_id;";
|
||||
db.execSQL(sql);
|
||||
|
||||
//Добавляю временную зону timezone к 2м формам саранчи и проти саранчи
|
||||
sql = "ALTER TABLE frmlocust ADD timezone text;";
|
||||
db.execSQL(sql);
|
||||
sql = "ALTER TABLE frmlocustdel ADD timezone text;";
|
||||
db.execSQL(sql);
|
||||
|
||||
//We converted the version of the database to version 145.
|
||||
oldVersion=146;
|
||||
}
|
||||
if(oldVersion==146) //Новый контракт на 2020 год
|
||||
{
|
||||
sql = "ALTER TABLE CountriesRegions ADD lon_max double;";
|
||||
db.execSQL(sql);
|
||||
sql = "ALTER TABLE CountriesRegions ADD lon_min double;";
|
||||
db.execSQL(sql);
|
||||
sql = "ALTER TABLE CountriesRegions ADD lat_max double;";
|
||||
db.execSQL(sql);
|
||||
sql = "ALTER TABLE CountriesRegions ADD lat_min double;";
|
||||
db.execSQL(sql);
|
||||
sql = "ALTER TABLE CountriesRegions ADD area double;";
|
||||
db.execSQL(sql);
|
||||
//Чтобы заново закачался
|
||||
sql = "update CountriesRegions set seq=1;";
|
||||
db.execSQL(sql);
|
||||
//Коордионаты границы для региона
|
||||
//sql = "create table if not exists CountriesRegionsPoints(" +
|
||||
// "id integer NOT NULL PRIMARY KEY AUTOINCREMENT," +
|
||||
// "uid text, " + //Уникальный идентификатор
|
||||
// "del boolean NOT NULL DEFAULT 0," +
|
||||
// "seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
// "country_region_id int NOT NULL," +
|
||||
// "pos integer NOT NULL," +
|
||||
// "lon double, " +
|
||||
// "lat double " +
|
||||
// ");";
|
||||
//db.execSQL(sql);
|
||||
|
||||
oldVersion=147;
|
||||
}
|
||||
if(oldVersion==147){
|
||||
sql = "ALTER TABLE frmlocustdel ADD efficiency boolean NOT NULL DEFAULT 0;";
|
||||
db.execSQL(sql);
|
||||
|
||||
oldVersion=148;
|
||||
}
|
||||
if(oldVersion==148) {
|
||||
// Для идентификации терминала как зарегистрированного (должна быть 1 запись)
|
||||
sql = "create table if not exists terminals(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"country_id integer," +
|
||||
"company_id integer," +
|
||||
"company_name text," + //Временноеполе до обновления таблицы компаний
|
||||
"name text," +
|
||||
"serial text," +
|
||||
"phone text" +
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
//Список компаний
|
||||
sql = "create table if not exists companies(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"name text NOT NULL" +
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
oldVersion=149;
|
||||
}
|
||||
if(oldVersion==149) {
|
||||
//Добвилось поле тестовая ли анкета
|
||||
sql = "ALTER TABLE frmlocustdel ADD test boolean;";
|
||||
db.execSQL(sql);
|
||||
sql = "UPDATE frmlocustdel set test=0;";
|
||||
db.execSQL(sql);
|
||||
|
||||
//Добвилось поле тестовая ли анкета
|
||||
sql = "ALTER TABLE frmlocust ADD test boolean;";
|
||||
db.execSQL(sql);
|
||||
sql = "UPDATE frmlocust set test=0;";
|
||||
db.execSQL(sql);
|
||||
|
||||
oldVersion=150;
|
||||
}
|
||||
if(oldVersion==150) {
|
||||
sql = "create table if not exists frmlocust_locations(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"frmlocust_uid text," +
|
||||
"pos integer NOT NULL," + //Позиция
|
||||
"lon double NOT NULL," +
|
||||
"lat double NOT NULL" +
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
sql = "update frmlocust set lon_center=lon1,lat_center=lat1";
|
||||
db.execSQL(sql);
|
||||
//Если есть старые данные то копирую их в новую таблицу
|
||||
sql = "insert into frmlocust_locations(frmlocust_uid,lon,lat,pos) select uid,lon1,lat1,1 from frmlocust where lon1 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocust_locations(frmlocust_uid,lon,lat,pos) select uid,lon2,lat2,2 from frmlocust where lon2 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocust_locations(frmlocust_uid,lon,lat,pos) select uid,lon3,lat3,3 from frmlocust where lon3 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocust_locations(frmlocust_uid,lon,lat,pos) select uid,lon4,lat4,4 from frmlocust where lon4 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocust_locations(frmlocust_uid,lon,lat,pos) select uid,lon5,lat5,5 from frmlocust where lon5 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocust_locations(frmlocust_uid,lon,lat,pos) select uid,lon6,lat6,6 from frmlocust where lon6 is not null";
|
||||
db.execSQL(sql);
|
||||
|
||||
sql = "create table if not exists frmlocustdel_locations(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"frmlocustdel_uid text," +
|
||||
"pos integer NOT NULL," + //Позиция
|
||||
"lon double NOT NULL," +
|
||||
"lat double NOT NULL" +
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
//Если есть старые данные то копирую их в новую таблицу
|
||||
sql = "insert into frmlocustdel_locations(frmlocustdel_uid,lon,lat,pos) select uid,lon1,lat1,1 from frmlocustdel where lon1 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocustdel_locations(frmlocustdel_uid,lon,lat,pos) select uid,lon2,lat2,2 from frmlocustdel where lon2 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocustdel_locations(frmlocustdel_uid,lon,lat,pos) select uid,lon3,lat3,3 from frmlocustdel where lon3 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocustdel_locations(frmlocustdel_uid,lon,lat,pos) select uid,lon4,lat4,4 from frmlocustdel where lon4 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocustdel_locations(frmlocustdel_uid,lon,lat,pos) select uid,lon5,lat5,5 from frmlocustdel where lon5 is not null";
|
||||
db.execSQL(sql);
|
||||
sql = "insert into frmlocustdel_locations(frmlocustdel_uid,lon,lat,pos) select uid,lon6,lat6,6 from frmlocustdel where lon6 is not null";
|
||||
db.execSQL(sql);
|
||||
|
||||
oldVersion=151;
|
||||
}
|
||||
if(oldVersion==151) {
|
||||
|
||||
sql = "ALTER TABLE frmlocustdel ADD locust_purpose_id integer;";
|
||||
db.execSQL(sql);
|
||||
sql = """
|
||||
update main.frmlocustdel set
|
||||
locust_purpose_id =
|
||||
CASE
|
||||
WHEN locust_swarm THEN 3
|
||||
WHEN locust_kuliguli THEN 2
|
||||
WHEN locust_imago THEN 1
|
||||
WHEN locust_sparse THEN 4
|
||||
ELSE locust_purpose_id
|
||||
END
|
||||
where
|
||||
locust_purpose_id is null;
|
||||
""";
|
||||
db.execSQL(sql);
|
||||
|
||||
sql = "ALTER TABLE frmlocustdel ADD efficacy_impact_id integer;";
|
||||
db.execSQL(sql);
|
||||
sql = "ALTER TABLE frmlocustdel ADD insecticide_diluted_id integer;";
|
||||
db.execSQL(sql);
|
||||
sql = "ALTER TABLE frmlocustdel ADD insecticide_proportion float;";
|
||||
db.execSQL(sql);
|
||||
|
||||
sql = "create table if not exists list_purpose(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор (пока не используется)
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"name text NOT NULL," +
|
||||
"sort integer" + //Порядок сортировки (специально для справичников)
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
sql = "create table if not exists list_impact(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор (пока не используется)
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"name text NOT NULL," +
|
||||
"sort integer" + //Порядок сортировки (специально для справичников)
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
sql = "create table if not exists list_diluted(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор (пока не используется)
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"name text NOT NULL," +
|
||||
"sort integer" + //Порядок сортировки (специально для справичников)
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
sql = "create table if not exists frmlocusthealth_locations(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор (пока не используется)
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"frmlocusthealth_uid text," +
|
||||
"pos integer NOT NULL," + //Позиция
|
||||
"lon double NOT NULL," +
|
||||
"lat double NOT NULL" +
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
//Для формы уничтожения саранчи id может быть пустым (только если создали на КПК)
|
||||
sql = "create table if not exists frmlocusthealth(" +
|
||||
"id integer," + //Локальный идентификатор на сервере для убыстрения доступа
|
||||
"uid text NOT NULL, " + //Уникальный идентификатор
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," +
|
||||
"send boolean NOT NULL DEFAULT 0," +
|
||||
|
||||
"frmlocustdel_uid text NOT NULL," + //На основе какой формы заполняется анкета
|
||||
|
||||
"filled boolean," + //Заполнена ли анкета (спец поле а не проверка на NULL потому что обязательность полей можно выставлять галочкой в интерфейсе)
|
||||
"device_id text, " + //Идентификатор устройства
|
||||
|
||||
"user_id integer," + //Идентификатор пользователя который заполняет анкету
|
||||
|
||||
|
||||
//Идентификация места мониторинга
|
||||
"observer text, " + //Имя руководителя бригады по мониторингу ЗЧ и ОС
|
||||
"date integer," + //Дата создания (по гринвичу?)
|
||||
"frmlocustdel_filled boolean," + //Заполнялась ли Форма по Мониторингу противосаранчовых обработок бригадой по обработке? (Похоже что это бесполезное поле так как есть поле frmlocustdel_uid)
|
||||
|
||||
//Бригада по обработке
|
||||
"brigade_count integer," + //Количество работников в бригаде по обработке
|
||||
"brigade_count_trained integer," + //Количество работников, ранее обученных обращению с инсектицидами и их применению
|
||||
|
||||
//Информация об инсектицидах
|
||||
"insecticide_part_number text," + //Номер партии препарата (если указан на контейнере)
|
||||
"insecticide_manufactured_date text," + //Дата производства или срок годности (срок хранения)
|
||||
"insecticide_expiration_date integer," + //********** На всякий случай, может и не пригодиться **********
|
||||
"insecticide_container_state_id integer," + //Состояние пакетов или контейнеров с инсектицидами
|
||||
|
||||
//Сведения по опрыскиванию
|
||||
"spr_leak boolean," + //Механическая безопасность: наблюдалась ли утечка инсектицида? (Да, Нет)
|
||||
"spr_leak_place text," + //Если Да, в какой части опрыскивателя имеется утечка? (Текст)
|
||||
"spr_damage boolean," + //Система опрыскивания: повреждены распылители или сопла? (Да, Нет)
|
||||
"spr_damage_place text," + //Если Да, какие повреждения? (Текст)
|
||||
|
||||
"spr_treated_area_check float,"+// Обработанная площадь (проверено бригадой по мониторингу) (га)
|
||||
"spr_fact_volume float," + // Фактическая норма объема опрыскивания (л/га) Расчет: (объем/площадь)
|
||||
"spr_observation boolean," + // Если проводилось наблюдение за опрыскиванием: соблюдалась ли надлежащая практика применения инсектицидов?
|
||||
"spr_description text," + // Замечания относительно наблюдаемой практики опрыскивания
|
||||
|
||||
//Калибровка опрыскивателя
|
||||
"calibr_consumption_check boolean," + // Калибровка расхода жидкости: проверялся ли расход жидкости опрыскивателя во время мониторинга?
|
||||
"calibr_time integer," + // Время калибровки (мин.):
|
||||
"calibr_volume integer," + // Собранный объем (л):
|
||||
"calibr_rate integer," + // Расход жидкости (л/мин):
|
||||
"calibr_precipitation boolean," + // Качество применения: проверялось ли осаждение капель во время мониторинга?
|
||||
"calibr_width_card float," + // Длина трансекты, определенная с использованием масляно-/водочувствительной бумаги (м)
|
||||
"calibr_wind_speed float," + // Средняя скорость ветра при осаждении капель (м/с)
|
||||
"calibr_droplet_coating float," + // Ширина дорожки с хорошим покрытием капель (м)
|
||||
"calibr_passes_interval float," + // Рекомендуемый интервал между проходами (м)
|
||||
|
||||
// Контроль эффективности
|
||||
"efficacy_control boolean," + // Проведен ли контроль эффективности (бригада мониторинга)?
|
||||
"efficacy_impact_type_id integer," + // Тип оцениваемого биологического воздействия
|
||||
"efficacy_mortality float," + // Наблюдаемая эффективность обработки (%)
|
||||
"efficacy_passed_time float," + // Прошло времени после обработки
|
||||
"efficacy_mortality_method integer," + // Метод оценки эффективности обработки (выбор: подсчет квадратов; подсчет по разрезам; подсчет кулиг личинок; другое)
|
||||
|
||||
// Здоровье человека
|
||||
"hlth_safety_clothing_clean boolean," + //Защитная одежда чистая и в хорошем состоянии (В 2024 сказали оставить только в форме по ЗЧ и ОС)
|
||||
"hlth_clothing_state text," + // Замечания относительно типа и состояния средств индивидуальной защиты
|
||||
"hlth_clothing_reserve boolean," + // В бригаде или на ближайшей противосаранчовой базе имеется запасная защитная одежда (в частности, комбинезоны и перчатки)
|
||||
"hlth_operator_passport integer," + // Количество операторов с паспортами использования пестицидов
|
||||
"hlth_filled_passport integer," + // Количество правильно заполненных паспортов использования пестицидов
|
||||
"hlth_inhibition boolean," + // Во время мониторинга измерялось ли ингибирование холинэстеразы?
|
||||
"hlth_description text," + // Дополнительные сведения о случайном воздействии или отравлении
|
||||
|
||||
// Состояние окружающей среды
|
||||
"safety_observed_pollution boolean," + // Наблюдалось или сообщалось о случайном загрязнении? (например, разлив инсектицидов, неправильная очистка оборудования и т. д.)
|
||||
"safety_type_pollution text," + // Если Да, то где и какой тип загрязнения?
|
||||
|
||||
"safety_non_target boolean," + // Наблюдалось или сообщалось о воздействии на нецелевые организмы? (например, болезни домашнего скота, смертность рыб, гибель пчел и т.д.)
|
||||
"safety_non_target_effect text," + // Если Да, то где и какое воздействие?
|
||||
"safety_non_target_effect_person text," + // Если информация поступила от прочих лиц, от кого именно? (укажите имя, номер телефона, адрес)
|
||||
|
||||
"safety_control boolean," + // Осуществлялся ли бригадой по мониторингу ЗЧ и ОС контроль в отношении наблюдаемого или зарегистрированного воздействия на окружающую среду
|
||||
"safety_control_actions text," + // Если Да, опишите последующее действие(я)
|
||||
|
||||
"map_treatment boolean," + // Была ли составлена ситуационная карта обработки?
|
||||
|
||||
"image_name1 text," + //Наименование рисунка 1
|
||||
"image_send1 boolean NOT NULL DEFAULT 0," + //Отправили ли рисунок 1 на сервер (При изменении отмечается как не отправленное false)
|
||||
"image_name2 text," + //Наименование рисунка 2
|
||||
"image_send2 boolean NOT NULL DEFAULT 0," + //Отправили ли рисунок 1 на сервер (При изменении отмечается как не отправленное false)
|
||||
"image_name3 text," + //Наименование рисунка 3
|
||||
"image_send3 boolean NOT NULL DEFAULT 0," + //Отправили ли рисунок 1 на сервер (При изменении отмечается как не отправленное false)
|
||||
"image_name4 text," + //Наименование рисунка 4
|
||||
"image_send4 boolean NOT NULL DEFAULT 0," + //Отправили ли рисунок 1 на сервер (При изменении отмечается как не отправленное false)
|
||||
"image_name5 text," + //Наименование рисунка 5
|
||||
"image_send5 boolean NOT NULL DEFAULT 0," + //Отправили ли рисунок 1 на сервер (При изменении отмечается как не отправленное false)
|
||||
|
||||
"risk_house boolean," + // Имеются ли в непосредственной близости от обработок жилые дома или жилье (в радиусе 2 км вокруг обрабатываемого участка)
|
||||
"risk_house_distance float," + // Расстояние от ближайшего края обрабатываемого участка (м) до ближайшего жилья:
|
||||
"risk_house_buffer_zones boolean," + // Соблюдались ли буферные зоны?
|
||||
"risk_house_impact boolean," + // Существует ли вероятность воздействия на жилые дома/жилье?
|
||||
"risk_house_informed boolean," + // Были ли проинформированы жители о применении инсектицидов? (проверка бригадой по мониторингу)
|
||||
|
||||
"risk_water boolean," + // Имеются ли в непосредственной близости от обработок поверхностные воды (в радиусе 2 км вокруг обрабатываемого участка)
|
||||
"risk_water_distance float," + // Расстояние от ближайшего края обрабатываемого участка (м) до ближайшего источника поверхностной воды:
|
||||
"risk_water_buffer_zones boolean," + // Соблюдались ли буферные зоны?
|
||||
"risk_water_impact boolean," + // Существует ли вероятность воздействия на поверхностные воды?
|
||||
|
||||
"risk_apiary boolean," + // Имеются ли в непосредственной близости от обработок пчеловодства (в радиусе 5 км вокруг обрабатываемого участка)
|
||||
"risk_apiary_distance float," + // Расстояние от ближайшего края обрабатываемого участка (м) до пасеки
|
||||
"risk_apiary_informed boolean," + // Были ли пчеловоды проинформированы о применении инсектицидов
|
||||
"risk_apiary_measure text," + // Какие меры были предприняты для снижения отрицательного воздействия на пчел
|
||||
"risk_apiary_impact boolean," + // Существует ли вероятность воздействия на пчел
|
||||
|
||||
"risk_agricultural boolean," + // Были ли обработаны или подверглись воздействию какие-либо сельхозкультуры?
|
||||
"risk_agricultural_name text," + // Наименование сельхозкультуры
|
||||
"risk_agricultural_phase text," + // Фаза развития сельхозкультуры
|
||||
"risk_agricultural_toxic boolean," + // Наблюдалась ли фитотоксичность
|
||||
"risk_agricultural_inform boolean," + // Были ли фермеры проинформированы о предуборочном периоде
|
||||
|
||||
"risk_silk boolean," + // Имеются ли в непосредственной близости от обработок шелководства (в радиусе 2 км вокруг обрабатываемого участка)
|
||||
"risk_silk_distance float," + // Расстояние от ближайшего края обрабатываемого участка (м) до тутовой плантации
|
||||
"risk_silk_inform boolean," + // Были ли шелководы проинформированы о применении инсектицидов?
|
||||
"risk_silk_trees_measure text," + // Какие меры были предприняты для снижения отрицательного воздействия на тутовые деревья
|
||||
"risk_silk_trees_impact boolean," + // Существует ли вероятность воздействия на тутовые деревья
|
||||
|
||||
"risk_pastures boolean," + // Были ли обработаны луга или пастбища?
|
||||
"risk_pastures_inform boolean," + // Были ли пастухи проинформированы о периодах удержания домашнего скота?
|
||||
|
||||
"risk_park boolean," + // Имеются ли в непосредственной близости от обработок другие экологически чувствительные зоны
|
||||
"risk_park_type text," + // Какой тип экологически чувствительной зоны
|
||||
"risk_park_distance float," + // Расстояние от ближайшего края обрабатываемого участка (м) до экологически чувствительной зоны
|
||||
"risk_park_buffer_zones boolean," + // Соблюдались ли буферные зоны?
|
||||
"risk_park_impact boolean," + // Существует ли вероятность воздействия на экологически чувствительные зоны?
|
||||
|
||||
"risk_probe_analysis boolean," + // Пробы, взятые для анализа остатков
|
||||
"risk_probe_analysis_name text," + // Проба какого субстрата или организма была взята
|
||||
"risk_probe_analysis_number text," + // Регистрационный номер формы отбора проб
|
||||
|
||||
"test boolean" + //Тестовая ли анкета
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
oldVersion=152;
|
||||
}
|
||||
if(oldVersion==152 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { //Для "RENAME COLUMN" Версия андроида должнв быть выше Android 11
|
||||
|
||||
//Теперь дата в виде текстового поля храниться так как при синхронизации с сервера она приходит в виде даты
|
||||
db.execSQL("ALTER TABLE frmlocust ADD COLUMN date_temp TEXT;");
|
||||
db.execSQL("UPDATE frmlocust SET date_temp = date;");
|
||||
db.execSQL("ALTER TABLE frmlocust RENAME COLUMN date TO date_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocust RENAME COLUMN date_temp TO date;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocustdel ADD COLUMN date_temp TEXT;");
|
||||
db.execSQL("UPDATE frmlocustdel SET date_temp = date;");
|
||||
db.execSQL("ALTER TABLE frmlocustdel RENAME COLUMN date TO date_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocustdel RENAME COLUMN date_temp TO date;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN date_temp TEXT;");
|
||||
db.execSQL("UPDATE frmlocusthealth SET date_temp = date;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN date TO date_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN date_temp TO date;");
|
||||
|
||||
//Дата производства или срок годности (срок хранения)
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN insecticide_manufactured_date_temp TEXT;");
|
||||
db.execSQL("UPDATE frmlocusthealth SET insecticide_manufactured_date_temp = insecticide_manufactured_date;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN insecticide_manufactured_date TO insecticide_manufactured_date_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN insecticide_manufactured_date_temp TO insecticide_manufactured_date;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD timezone text;");
|
||||
|
||||
sql = "create table if not exists list_containers_states(" +
|
||||
"id integer NOT NULL PRIMARY KEY," +
|
||||
"uid text, " + //Уникальный идентификатор пока не используется но для распределенной базы будет использоваться
|
||||
"del boolean NOT NULL DEFAULT 0," +
|
||||
"seq integer NOT NULL DEFAULT 1," + //Время изменения
|
||||
"name text NOT NULL," +
|
||||
"sort integer" + //Порядок сортировки (специально для справичников)
|
||||
");";
|
||||
db.execSQL(sql);
|
||||
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN spr_leak_plase TO spr_leak_plase_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN spr_damage_plase TO spr_damage_plase_DEL;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN spr_leak_place TEXT;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN spr_damage_place TEXT;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN spr_treated_area_check TO spr_treated_area_check_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN spr_treated_area_check float;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN spr_fact_volume float;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN efficacy_mortality_method TO efficacy_mortality_method_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN efficacy_mortality_method_id integer;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN hlth_inhibition boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN hlth_safety_clothing_clean boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN hlth_passport_count TO hlth_passport_count_DEL;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN lat_center double;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN lon_center double;");
|
||||
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_house TO risk_house_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_house boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_house_distance TO risk_house_distance_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_house_distance float;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_house_buffer_zones TO risk_house_buffer_zones_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_house_buffer_zones boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_house_impact TO risk_house_impact_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_house_impact boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_house_informed TO risk_house_informed_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_house_informed boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_water TO risk_water_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_water boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_water_distance TO risk_water_distance_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_water_distance float;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_water_buffer_zones TO risk_water_buffer_zones_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_water_buffer_zones boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_water_impact TO risk_water_impact_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_water_impact boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_apiary TO risk_apiary_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_apiary boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_apiary_distance TO risk_apiary_distance_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_apiary_distance float;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_apiary_informed TO risk_apiary_informed_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_apiary_informed boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_apiary_measure TO risk_apiary_measure_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_apiary_measure text;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_apiary_impact TO risk_apiary_impact_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_apiary_impact boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN safety_control TO safety_control_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN safety_control boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN safety_control_actions TO safety_control_actions_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN safety_control_actions text;");
|
||||
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_agricultural TO risk_agricultural_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_agricultural boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_agricultural_name TO risk_agricultural_name_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_agricultural_name text;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_agricultural_phase TO risk_agricultural_phase_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_agricultural_phase text;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_agricultural_toxic TO risk_agricultural_toxic_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_agricultural_toxic boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_agricultural_inform TO risk_agricultural_inform_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_agricultural_inform boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_silk_inform TO risk_silk_inform_DEL;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_silk_inform boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_silk_trees_measure TO risk_silk_trees_measure_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_silk_trees_measure text;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_silk_trees_impact TO risk_silk_trees_impact_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_silk_trees_impact boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_pastures TO risk_pastures_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_pastures boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_pastures_inform TO risk_pastures_inform_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_pastures_inform boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_park TO risk_park_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_park boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_park_type TO risk_park_type_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_park_type text;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_park_distance TO risk_park_distance_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_park_distance float;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_park_buffer_zones TO risk_park_buffer_zones_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_park_buffer_zones boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_park_impact TO risk_park_impact_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_park_impact boolean;");
|
||||
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_probe_analysis TO risk_probe_analysis_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_probe_analysis boolean;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_probe_analysis_name TO risk_probe_analysis_name_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_probe_analysis_name text;");
|
||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN risk_probe_analysis_number TO risk_probe_analysis_number_DEL;"); //Гадина при вставке учитывает регистр символов!!!
|
||||
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN risk_probe_analysis_number text;");
|
||||
|
||||
oldVersion=153;
|
||||
}
|
||||
*/
|
||||
|
||||
if(oldVersion < newVersion) //Это условие выполняется: если совсем старые версии и не знаю что поменялось...
|
||||
{
|
||||
|
||||
@ -36,6 +36,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
import android.widget.GridLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ScrollView;
|
||||
@ -166,7 +167,10 @@ public class LocustDelActivity extends FragmentActivity implements LocationListe
|
||||
|
||||
public CheckBox cbEffectiveness = null; // Галочка чтоб сделать поля не обязательными
|
||||
|
||||
public View spiTypeImpact = null; // Тип оцениваемого биологического воздействия
|
||||
//public View spiTypeImpact = null; // Тип оцениваемого биологического воздействия
|
||||
public GridLayout glBiologicalImpact = null; // Тип оцениваемого биологического воздействия (grid)
|
||||
public EditText edtBiologicalImpact = null; // Тип оцениваемого биологического воздействия (список значений)
|
||||
|
||||
public EditText edtEffMortality = null; // смертность саранчи(%)
|
||||
public EditText edtEffTime = null; // Прошло времени после обработки в часах
|
||||
public View spiEffMethod = null; // метод подсчета смертности
|
||||
@ -1026,7 +1030,7 @@ public class LocustDelActivity extends FragmentActivity implements LocationListe
|
||||
};
|
||||
cbEffectiveness.setOnClickListener(oclCbBoxEggs);
|
||||
|
||||
spiTypeImpact = findViewById(R.id.spiTypeImpact); //Тип оцениваемого биологического воздействия
|
||||
/*spiTypeImpact = findViewById(R.id.spiTypeImpact); //Тип оцениваемого биологического воздействия
|
||||
guiTable.add(spiTypeImpact, "efficacy_impact_id");
|
||||
((selectDB)spiTypeImpact).addField("", "");
|
||||
dboh = new DbOpenHelper(this);
|
||||
@ -1049,8 +1053,102 @@ public class LocustDelActivity extends FragmentActivity implements LocationListe
|
||||
if(cursor!=null){ cursor.close(); }
|
||||
if(rdb!=null){ rdb.close(); }
|
||||
}
|
||||
dboh.close();*/
|
||||
|
||||
//Type of biological impact being assessed (I build a table of checkboxes)
|
||||
edtBiologicalImpact = findViewById(R.id.edtBiologicalImpact);
|
||||
guiTable.add(edtBiologicalImpact, "efficacy_impact");
|
||||
CompoundButton.OnCheckedChangeListener occlBiologicalImpact = new CompoundButton.OnCheckedChangeListener()
|
||||
{
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
|
||||
{
|
||||
StringBuilder val = new StringBuilder();
|
||||
// loop through all elements inside the GridLayout
|
||||
for (int i = 0; i < glBiologicalImpact.getChildCount(); i++) {
|
||||
View child = glBiologicalImpact.getChildAt(i);
|
||||
if (child instanceof CheckBox) {
|
||||
CheckBox cb = (CheckBox) child;
|
||||
if (cb.isChecked()) {
|
||||
val.append(cb.getTag().toString()).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
// remove the last comma if there is one
|
||||
if (val.length() > 0 && val.charAt(val.length() - 1) == ',') {
|
||||
val.deleteCharAt(val.length() - 1);
|
||||
}
|
||||
// save in editText
|
||||
LocustDelActivity.this.edtBiologicalImpact.setText(val.toString());
|
||||
}
|
||||
};
|
||||
|
||||
edtBiologicalImpact.addTextChangedListener(new TextWatcher()
|
||||
{
|
||||
public void afterTextChanged(Editable s){}
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||
{
|
||||
String str = LocustDelActivity.this.edtBiologicalImpact.getText().toString();
|
||||
for (int i = 0; i < glBiologicalImpact.getChildCount(); i++) {
|
||||
View child = glBiologicalImpact.getChildAt(i);
|
||||
if (child instanceof CheckBox) {
|
||||
CheckBox cb = (CheckBox) child;
|
||||
String val = cb.getTag().toString();
|
||||
if(str.contains(val) && !cb.isChecked()) {
|
||||
cb.setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
glBiologicalImpact = findViewById(R.id.glBiologicalImpact);
|
||||
dboh = new DbOpenHelper(this);
|
||||
rdb = null;
|
||||
cursor = null;
|
||||
try {
|
||||
rdb = dboh.getReadableDatabase();
|
||||
cursor = rdb.rawQuery("select d.id, COALESCE((SELECT translation FROM _translations t JOIN _languages l ON t.language_id=l.id WHERE t.del = 0 AND identifier = d.name AND l.short_name='"
|
||||
+ Tools.getLang() + "' LIMIT 1),d.name) name from list_impact d where d.del=0 order by d.sort,d.name", null);
|
||||
if (cursor.moveToFirst())
|
||||
{
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
int colCount = glBiologicalImpact.getColumnCount(); // например 2
|
||||
do
|
||||
{
|
||||
String name = cursor.getString(cursor.getColumnIndexOrThrow("name"));
|
||||
String id = cursor.getString(cursor.getColumnIndexOrThrow("id"));
|
||||
|
||||
CheckBox cb = new CheckBox(this);
|
||||
cb.setText(name);
|
||||
cb.setTag(id);
|
||||
cb.setLayoutParams(new GridLayout.LayoutParams(
|
||||
GridLayout.spec(row, 1f), // row index
|
||||
GridLayout.spec(col, 1f) // column index
|
||||
));
|
||||
cb.setOnCheckedChangeListener(occlBiologicalImpact);
|
||||
glBiologicalImpact.addView(cb);
|
||||
|
||||
col++;
|
||||
if (col >= colCount) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
if(cursor!=null){ cursor.close(); }
|
||||
if(rdb!=null){ rdb.close(); }
|
||||
}
|
||||
dboh.close();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
edtEffMortality = (EditText) findViewById(R.id.edtEffMortality); // смертность саранчи(%)
|
||||
guiTable.add(edtEffMortality, "efficacy_mortality");
|
||||
//edtEffMortality.setFilters(new InputFilter[] { new InputFilterMinMax("0", "100") });
|
||||
@ -1869,6 +1967,13 @@ public class LocustDelActivity extends FragmentActivity implements LocationListe
|
||||
llEffectiveness.setVisibility(View.VISIBLE);
|
||||
} else
|
||||
{
|
||||
for (int i = 0; i < glBiologicalImpact.getChildCount(); i++) {
|
||||
View child = glBiologicalImpact.getChildAt(i);
|
||||
if (child instanceof CheckBox) {
|
||||
CheckBox cb = (CheckBox) child;
|
||||
cb.setChecked(false);
|
||||
}
|
||||
}
|
||||
edtEffMortality.setText("");
|
||||
edtEffTime.setText("");
|
||||
((selectDB)spiEffMethod).setValue("");
|
||||
|
||||
@ -606,16 +606,16 @@ public class LocustDelListActivity extends AppCompatActivity
|
||||
switch (spiList.getSelectedItemPosition())
|
||||
{
|
||||
case 0:
|
||||
cursor = rdb.rawQuery("select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and filled!=1 and device_id='" + android_id + "'", null); //Не отправленные
|
||||
cursor = rdb.rawQuery("select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and filled!=1 and device_id='" + android_id + "'", null); //Не отправленные
|
||||
break;
|
||||
case 1:
|
||||
cursor = rdb.rawQuery("select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and send=0 and filled=1 and device_id='"+android_id+"'", null); //Не отправленные
|
||||
cursor = rdb.rawQuery("select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and send=0 and filled=1 and device_id='"+android_id+"'", null); //Не отправленные
|
||||
break;
|
||||
case 2:
|
||||
cursor = rdb.rawQuery("select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and send=1 and device_id='"+android_id+"'", null); //Отправленные
|
||||
cursor = rdb.rawQuery("select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and send=1 and device_id='"+android_id+"'", null); //Отправленные
|
||||
break;
|
||||
default:
|
||||
cursor = rdb.rawQuery("select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and device_id='"+android_id+"'", null); //Все
|
||||
cursor = rdb.rawQuery("select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0 and device_id='"+android_id+"'", null); //Все
|
||||
//cursor = rdb.rawQuery("select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocustdel where del=0", null); //Все
|
||||
break;
|
||||
}
|
||||
|
||||
@ -31,7 +31,9 @@ import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.GridLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ScrollView;
|
||||
@ -157,14 +159,20 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
public EditText edtCalibrDropletCoating = null; //H Ширина дорожки с хорошим покрытием капель (м)
|
||||
public EditText edtCalibrPassesInterval = null; //H Рекомендуемый интервал между проходами (м)
|
||||
|
||||
public View spiEffControl = null; // Контроль эфективности
|
||||
public View spiEffTypeImpact = null; // Тип оцениваемого биологического воздействия
|
||||
public View spiEffControl = null; // Контроль эфективности (Контроль эффективности проведен (бригада по обработке)?)
|
||||
//public View spiEffTypeImpact = null; // Тип оцениваемого биологического воздействия (теперь множественный выбор, не используется)
|
||||
public GridLayout glBiologicalImpact = null; // Тип оцениваемого биологического воздействия (grid)
|
||||
public EditText edtBiologicalImpact = null; // Тип оцениваемого биологического воздействия (список значений)
|
||||
|
||||
public EditText edtEffMortality = null; // смертность саранчи(%)
|
||||
public EditText edtEffPassedTime = null; // Прошло времени после обработки в часах
|
||||
public EditText edtEffPassedTime = null; // Прошло времени после обработки в часах
|
||||
public View spiEffMethod = null; // метод подсчета смертности
|
||||
|
||||
public View spiEffControl2 = null; //H Проведен ли контроль эффективности (бригада мониторинга)?
|
||||
public View spiEffTypeImpact2 = null; //H Тип оцениваемого биологического воздействия
|
||||
//public View spiEffTypeImpact2 = null; //H Тип оцениваемого биологического воздействия
|
||||
public GridLayout glEffTypeImpact = null; //H Тип оцениваемого биологического воздействия(grid)
|
||||
public EditText edtEffTypeImpact = null; //H Тип оцениваемого биологического воздействия (список значений)
|
||||
|
||||
public EditText edtEffMortality2 = null; //H Наблюдаемая эффективность обработки (%)
|
||||
public EditText edtEffPassedTime2 = null; //H Прошло времени после обработки
|
||||
public View spiEffMethod2 = null; //H Метод оценки эффективности обработки (выбор: подсчет квадратов; подсчет по разрезам; подсчет кулиг личинок; другое)
|
||||
@ -1273,7 +1281,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
}
|
||||
|
||||
//Тип оцениваемого биологического воздействия
|
||||
spiEffTypeImpact = findViewById(R.id.spiEffTypeImpact);
|
||||
/*spiEffTypeImpact = findViewById(R.id.spiEffTypeImpact);
|
||||
guiTableDel.add(spiEffTypeImpact, "efficacy_impact_id");
|
||||
((selectDB)spiEffTypeImpact).addField("", "");
|
||||
dboh = new DbOpenHelper(this);
|
||||
@ -1297,8 +1305,106 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
if(cursor!=null){ cursor.close(); }
|
||||
if(rdb!=null){ rdb.close(); }
|
||||
}
|
||||
dboh.close();*/
|
||||
|
||||
//Type of biological impact being assessed (I build a table of checkboxes)
|
||||
edtBiologicalImpact = findViewById(R.id.edtBiologicalImpact);
|
||||
guiTableDel.add(edtBiologicalImpact, "efficacy_impact");
|
||||
CompoundButton.OnCheckedChangeListener occlBiologicalImpact = new CompoundButton.OnCheckedChangeListener()
|
||||
{
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
|
||||
{
|
||||
StringBuilder val = new StringBuilder();
|
||||
// loop through all elements inside the GridLayout
|
||||
for (int i = 0; i < glBiologicalImpact.getChildCount(); i++) {
|
||||
View child = glBiologicalImpact.getChildAt(i);
|
||||
if (child instanceof CheckBox) {
|
||||
CheckBox cb = (CheckBox) child;
|
||||
if (cb.isChecked()) {
|
||||
val.append(cb.getTag().toString()).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
// remove the last comma if there is one
|
||||
if (val.length() > 0 && val.charAt(val.length() - 1) == ',') {
|
||||
val.deleteCharAt(val.length() - 1);
|
||||
}
|
||||
// save in editText
|
||||
LocustHealthActivity.this.edtBiologicalImpact.setText(val.toString());
|
||||
}
|
||||
};
|
||||
|
||||
edtBiologicalImpact.addTextChangedListener(new TextWatcher()
|
||||
{
|
||||
public void afterTextChanged(Editable s){}
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||
{
|
||||
String str = LocustHealthActivity.this.edtBiologicalImpact.getText().toString();
|
||||
for (int i = 0; i < glBiologicalImpact.getChildCount(); i++) {
|
||||
View child = glBiologicalImpact.getChildAt(i);
|
||||
if (child instanceof CheckBox) {
|
||||
CheckBox cb = (CheckBox) child;
|
||||
String val = cb.getTag().toString();
|
||||
if(str.contains(val) && !cb.isChecked()) {
|
||||
cb.setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
glBiologicalImpact = findViewById(R.id.glBiologicalImpact);
|
||||
dboh = new DbOpenHelper(this);
|
||||
rdb = null;
|
||||
cursor = null;
|
||||
try {
|
||||
rdb = dboh.getReadableDatabase();
|
||||
cursor = rdb.rawQuery("select d.id, COALESCE((SELECT translation FROM _translations t JOIN _languages l ON t.language_id=l.id WHERE t.del = 0 AND identifier = d.name AND l.short_name='"
|
||||
+ Tools.getLang() + "' LIMIT 1),d.name) name from list_impact d where d.del=0 order by d.sort,d.name", null);
|
||||
if (cursor.moveToFirst())
|
||||
{
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
int colCount = glBiologicalImpact.getColumnCount(); // например 2
|
||||
do
|
||||
{
|
||||
String name = cursor.getString(cursor.getColumnIndexOrThrow("name"));
|
||||
String id = cursor.getString(cursor.getColumnIndexOrThrow("id"));
|
||||
|
||||
CheckBox cb = new CheckBox(this);
|
||||
cb.setEnabled(false);
|
||||
cb.setText(name);
|
||||
cb.setTag(id);
|
||||
cb.setLayoutParams(new GridLayout.LayoutParams(
|
||||
GridLayout.spec(row, 1f), // row index
|
||||
GridLayout.spec(col, 1f) // column index
|
||||
));
|
||||
cb.setOnCheckedChangeListener(occlBiologicalImpact);
|
||||
glBiologicalImpact.addView(cb);
|
||||
|
||||
col++;
|
||||
if (col >= colCount) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
if(cursor!=null){ cursor.close(); }
|
||||
if(rdb!=null){ rdb.close(); }
|
||||
}
|
||||
dboh.close();
|
||||
|
||||
//+++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Наблюдаемая эфективность обработок (%)
|
||||
edtEffMortality = (EditText) findViewById(R.id.edtEffMortality);
|
||||
guiTableDel.add(edtEffMortality, "efficacy_mortality");
|
||||
@ -1362,7 +1468,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
llEffPassedTime2.setVisibility(View.VISIBLE);
|
||||
llEffMethod2.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
((selectDB)spiEffTypeImpact2).setValue(null);
|
||||
//((selectDB)spiEffTypeImpact2).setValue(null);
|
||||
edtEffMortality2.setText("");
|
||||
edtEffPassedTime2.setText("");
|
||||
((selectDB)spiEffMethod2).setValue(null);
|
||||
@ -1374,7 +1480,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
}
|
||||
});
|
||||
//H Тип оцениваемого биологического воздействия
|
||||
spiEffTypeImpact2 = findViewById(R.id.spiEffTypeImpact2);
|
||||
/*spiEffTypeImpact2 = findViewById(R.id.spiEffTypeImpact2);
|
||||
guiTableHealth.add(spiEffTypeImpact2, "efficacy_impact_type_id");
|
||||
((selectDB)spiEffTypeImpact2).addField("", "");
|
||||
dboh = new DbOpenHelper(this);
|
||||
@ -1396,8 +1502,103 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
if(cursor!=null){ cursor.close(); }
|
||||
if(rdb!=null){ rdb.close(); }
|
||||
}
|
||||
dboh.close();*/
|
||||
|
||||
//Type of biological impact being assessed (I build a table of checkboxes)
|
||||
edtEffTypeImpact = findViewById(R.id.edtEffTypeImpact);
|
||||
guiTableHealth.add(edtEffTypeImpact, "efficacy_impact_type");
|
||||
CompoundButton.OnCheckedChangeListener occlEffTypeImpact = new CompoundButton.OnCheckedChangeListener()
|
||||
{
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
|
||||
{
|
||||
StringBuilder val = new StringBuilder();
|
||||
// loop through all elements inside the GridLayout
|
||||
for (int i = 0; i < glEffTypeImpact.getChildCount(); i++) {
|
||||
View child = glEffTypeImpact.getChildAt(i);
|
||||
if (child instanceof CheckBox) {
|
||||
CheckBox cb = (CheckBox) child;
|
||||
if (cb.isChecked()) {
|
||||
val.append(cb.getTag().toString()).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
// remove the last comma if there is one
|
||||
if (val.length() > 0 && val.charAt(val.length() - 1) == ',') {
|
||||
val.deleteCharAt(val.length() - 1);
|
||||
}
|
||||
// save in editText
|
||||
LocustHealthActivity.this.edtEffTypeImpact.setText(val.toString());
|
||||
}
|
||||
};
|
||||
|
||||
edtEffTypeImpact.addTextChangedListener(new TextWatcher()
|
||||
{
|
||||
public void afterTextChanged(Editable s){}
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||
{
|
||||
String str = LocustHealthActivity.this.edtEffTypeImpact.getText().toString();
|
||||
for (int i = 0; i < glEffTypeImpact.getChildCount(); i++) {
|
||||
View child = glEffTypeImpact.getChildAt(i);
|
||||
if (child instanceof CheckBox) {
|
||||
CheckBox cb = (CheckBox) child;
|
||||
String val = cb.getTag().toString();
|
||||
if(str.contains(val) && !cb.isChecked()) {
|
||||
cb.setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
glEffTypeImpact = findViewById(R.id.glEffTypeImpact);
|
||||
dboh = new DbOpenHelper(this);
|
||||
rdb = null;
|
||||
cursor = null;
|
||||
try {
|
||||
rdb = dboh.getReadableDatabase();
|
||||
cursor = rdb.rawQuery("select d.id, COALESCE((SELECT translation FROM _translations t JOIN _languages l ON t.language_id=l.id WHERE t.del = 0 AND identifier = d.name AND l.short_name='"
|
||||
+ Tools.getLang() + "' LIMIT 1),d.name) name from list_impact d where d.del=0 order by d.sort,d.name", null);
|
||||
if (cursor.moveToFirst())
|
||||
{
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
int colCount = glEffTypeImpact.getColumnCount(); // например 2
|
||||
do
|
||||
{
|
||||
String name = cursor.getString(cursor.getColumnIndexOrThrow("name"));
|
||||
String id = cursor.getString(cursor.getColumnIndexOrThrow("id"));
|
||||
|
||||
CheckBox cb = new CheckBox(this);
|
||||
cb.setText(name);
|
||||
cb.setTag(id);
|
||||
cb.setLayoutParams(new GridLayout.LayoutParams(
|
||||
GridLayout.spec(row, 1f), // row index
|
||||
GridLayout.spec(col, 1f) // column index
|
||||
));
|
||||
cb.setOnCheckedChangeListener(occlEffTypeImpact);
|
||||
glEffTypeImpact.addView(cb);
|
||||
|
||||
col++;
|
||||
if (col >= colCount) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
if(cursor!=null){ cursor.close(); }
|
||||
if(rdb!=null){ rdb.close(); }
|
||||
}
|
||||
dboh.close();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//H Наблюдаемая эффективность обработки (%)
|
||||
edtEffMortality2 = (EditText) findViewById(R.id.edtEffMortality2);
|
||||
guiTableHealth.add(edtEffMortality2, "efficacy_mortality");
|
||||
@ -2333,10 +2534,10 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
if(spiCalibrConsumptionCheck.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiCalibrConsumptionCheck).updateAdapter(this);
|
||||
if(spiCalibrPrecipitation.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiCalibrPrecipitation).updateAdapter(this);
|
||||
if(spiEffControl.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffControl).updateAdapter(this);
|
||||
if(spiEffTypeImpact.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffTypeImpact).updateAdapter(this);
|
||||
//if(spiEffTypeImpact.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffTypeImpact).updateAdapter(this);
|
||||
if(spiEffMethod.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffMethod).updateAdapter(this);
|
||||
if(spiEffControl2.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffControl2).updateAdapter(this);
|
||||
if(spiEffTypeImpact2.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffTypeImpact2).updateAdapter(this);
|
||||
//if(spiEffTypeImpact2.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffTypeImpact2).updateAdapter(this);
|
||||
if(spiEffMethod2.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffMethod2).updateAdapter(this);
|
||||
if(spiHlthProtectiveClothingClean.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiHlthProtectiveClothingClean).updateAdapter(this);
|
||||
if(spiHlthClothingReserve.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiHlthClothingReserve).updateAdapter(this);
|
||||
@ -2551,7 +2752,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
||||
llEffPassedTime2.setVisibility(View.VISIBLE);
|
||||
llEffMethod2.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
((selectDB)spiEffTypeImpact2).setValue(null);
|
||||
//((selectDB)spiEffTypeImpact2).setValue(null);
|
||||
edtEffMortality2.setText("");
|
||||
edtEffPassedTime2.setText("");
|
||||
((selectDB)spiEffMethod2).setValue(null);
|
||||
|
||||
@ -1,12 +1,20 @@
|
||||
package kz.istt.locust;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Color;
|
||||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -26,6 +34,7 @@ import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.ParseException;
|
||||
@ -35,8 +44,14 @@ import java.util.Date;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
public class LocustHealthListActivity extends AppCompatActivity
|
||||
import dbfields.selectDB;
|
||||
import tools.LatLonListener;
|
||||
|
||||
public class LocustHealthListActivity extends AppCompatActivity implements LocationListener, LatLonListener
|
||||
{
|
||||
private LocationManager _lm;
|
||||
private double _lat = 0; // c GPS приёмника
|
||||
private double _lon = 0; // c GPS приёмника
|
||||
|
||||
public LinearLayout llList;
|
||||
public MyButton btn;
|
||||
@ -122,6 +137,13 @@ public class LocustHealthListActivity extends AppCompatActivity
|
||||
|
||||
//Чтоб список обновлялся раз в минуту в соответствии с текущем фильтром (для наглядности отправки данных)
|
||||
handler.post(runnable); // Начинаем выполнение задачи
|
||||
|
||||
// Чтоб слушать GPS (в конце метода чтобы успели присвоиться GUI компоненты локальным переменным)
|
||||
_lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
return;
|
||||
}
|
||||
_lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 1, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -601,14 +623,28 @@ public class LocustHealthListActivity extends AppCompatActivity
|
||||
try {
|
||||
rdb = dboh.getReadableDatabase();
|
||||
|
||||
|
||||
|
||||
/*
|
||||
_lat = location.getLatitude();
|
||||
_lon = location.getLongitude();
|
||||
|
||||
SELECT *,
|
||||
((latitude - ?) * (latitude - ?) + (longitude - ?) * (longitude - ?)) AS distance
|
||||
FROM locations
|
||||
ORDER BY distance ASC;
|
||||
*/
|
||||
|
||||
|
||||
switch (spiList.getSelectedItemPosition())
|
||||
{
|
||||
case 0:
|
||||
cursor = rdb.rawQuery("""
|
||||
select
|
||||
ld.seq,
|
||||
ld.uid as frmlocustdel_uid,
|
||||
lh.uid as frmlocusthealth_uid,
|
||||
coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
coalesce(ld.area,'') || ' ' || coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
lh.date,
|
||||
EXISTS(select 1 from frmlocusthealth where frmlocustdel_uid=ld.uid) as health
|
||||
from
|
||||
@ -617,14 +653,16 @@ public class LocustHealthListActivity extends AppCompatActivity
|
||||
where
|
||||
lh.del=0
|
||||
and lh.filled!=1
|
||||
order by ld.seq desc
|
||||
""", null); //Не отправленные
|
||||
break;
|
||||
case 1:
|
||||
cursor = rdb.rawQuery("""
|
||||
select
|
||||
ld.seq,
|
||||
ld.uid as frmlocustdel_uid,
|
||||
lh.uid as frmlocusthealth_uid,
|
||||
coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
coalesce(ld.area,'') || ' ' || coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
lh.date,
|
||||
EXISTS(select 1 from frmlocusthealth where frmlocustdel_uid=ld.uid) as health
|
||||
from
|
||||
@ -634,14 +672,16 @@ public class LocustHealthListActivity extends AppCompatActivity
|
||||
lh.del=0
|
||||
and lh.send=0
|
||||
and lh.filled=1
|
||||
order by ld.seq desc
|
||||
""", null); //Не отправленные
|
||||
break;
|
||||
case 2:
|
||||
cursor = rdb.rawQuery("""
|
||||
select
|
||||
ld.seq,
|
||||
ld.uid as frmlocustdel_uid,
|
||||
lh.uid as frmlocusthealth_uid,
|
||||
coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
coalesce(ld.area,'') || ' ' || coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
lh.date,
|
||||
EXISTS(select 1 from frmlocusthealth where frmlocustdel_uid=ld.uid) as health
|
||||
from
|
||||
@ -650,21 +690,58 @@ public class LocustHealthListActivity extends AppCompatActivity
|
||||
where
|
||||
lh.del=0
|
||||
and lh.send=1
|
||||
order by ld.seq desc
|
||||
""", null); //Отправленные
|
||||
break;
|
||||
default:
|
||||
cursor = rdb.rawQuery("""
|
||||
select
|
||||
ld.uid as frmlocustdel_uid,
|
||||
lh.uid as frmlocusthealth_uid,
|
||||
coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
coalesce(lh.date,ld.date) as date,
|
||||
EXISTS(select 1 from frmlocusthealth where frmlocustdel_uid=ld.uid) as health
|
||||
from
|
||||
frmlocustdel ld
|
||||
left join frmlocusthealth lh on lh.frmlocustdel_uid=ld.uid
|
||||
where ld.del=0 and ld.filled=1
|
||||
default: {
|
||||
|
||||
String prefName = "Distance";
|
||||
SharedPreferences prefs = getSharedPreferences("CommonPrefs", Activity.MODE_PRIVATE);
|
||||
String checked = prefs.getString(prefName, "");
|
||||
if(checked.isEmpty() || checked.equals("1")) {
|
||||
String[] selectionArgs = new String[]{
|
||||
String.valueOf(_lat),
|
||||
String.valueOf(_lat),
|
||||
String.valueOf(_lon),
|
||||
String.valueOf(_lon)
|
||||
};
|
||||
cursor = rdb.rawQuery("""
|
||||
|
||||
select
|
||||
ld.seq,
|
||||
ld.uid as frmlocustdel_uid,
|
||||
lh.uid as frmlocusthealth_uid,
|
||||
coalesce(ld.area,'') || ' ' || coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
coalesce(lh.date,ld.date) as date,
|
||||
EXISTS(select 1 from frmlocusthealth where frmlocustdel_uid=ld.uid) as health,
|
||||
((ld.lat_center - ?) * (ld.lat_center - ?) + (ld.lon_center - ?) * (ld.lon_center - ?)) AS distance
|
||||
from
|
||||
frmlocustdel ld
|
||||
left join frmlocusthealth lh on lh.frmlocustdel_uid=ld.uid
|
||||
where
|
||||
ld.del=0
|
||||
and ld.filled=1
|
||||
order by distance, ld.seq desc
|
||||
""", selectionArgs); //Все
|
||||
}else{
|
||||
cursor = rdb.rawQuery("""
|
||||
select
|
||||
ld.seq,
|
||||
ld.uid as frmlocustdel_uid,
|
||||
lh.uid as frmlocusthealth_uid,
|
||||
coalesce(ld.area,'') || ' ' || coalesce(ld.district,'') || ' ' || coalesce(ld.terrain,'') terrain,
|
||||
coalesce(lh.date,ld.date) as date,
|
||||
EXISTS(select 1 from frmlocusthealth where frmlocustdel_uid=ld.uid) as health
|
||||
from
|
||||
frmlocustdel ld
|
||||
left join frmlocusthealth lh on lh.frmlocustdel_uid=ld.uid
|
||||
where
|
||||
ld.del=0
|
||||
and ld.filled=1
|
||||
order by ld.seq desc
|
||||
""", null); //Все
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -779,4 +856,21 @@ public class LocustHealthListActivity extends AppCompatActivity
|
||||
dboh.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location location)
|
||||
{
|
||||
_lat = location.getLatitude(); // от устройства
|
||||
_lon = location.getLongitude(); // от устройства
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLat() {
|
||||
return this._lat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLon() {
|
||||
return this._lon;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -583,19 +583,19 @@ public class LocustListActivity extends AppCompatActivity
|
||||
switch (spiList.getSelectedItemPosition())
|
||||
{
|
||||
case 0:
|
||||
sql = "select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0 and filled!=1";
|
||||
sql = "select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0 and filled!=1";
|
||||
cursor = rdb.rawQuery(sql, null); //Не заполненые
|
||||
break;
|
||||
case 1:
|
||||
sql = "select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0 and send=0 and filled=1";
|
||||
sql = "select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0 and send=0 and filled=1";
|
||||
cursor = rdb.rawQuery(sql, null); //Не отправленные
|
||||
break;
|
||||
case 2:
|
||||
sql = "select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0 and send=1";
|
||||
sql = "select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0 and send=1";
|
||||
cursor = rdb.rawQuery(sql, null); //Отправленные
|
||||
break;
|
||||
default:
|
||||
sql = "select uid, coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0";
|
||||
sql = "select uid, coalesce(area,'') || ' ' || coalesce(district,'') || ' ' || coalesce(terrain,'') terrain, date from frmlocust where del=0";
|
||||
cursor = rdb.rawQuery(sql, null); //Все
|
||||
break;
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/** СМ. http://developer.android.com/reference/android/app/Activity.html
|
||||
* Происходит при старте и при возврате на этот Activity
|
||||
* */
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package kz.istt.locust;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
@ -8,6 +9,7 @@ import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Bitmap;
|
||||
@ -103,8 +105,28 @@ public class MapsActivity extends FragmentActivity implements OnMapReadyCallback
|
||||
if(g_uid==null) g_uid="";
|
||||
|
||||
// Чтоб слушать GPS
|
||||
|
||||
|
||||
lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 1, this);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && checkSelfPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{
|
||||
android.Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
android.Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
}, 1001);
|
||||
}else{
|
||||
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 1, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
if (requestCode == 1) {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 1, this);
|
||||
} else {
|
||||
Toast.makeText(this, getResources().getString(R.string.Please_activate_GPS), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1017,11 +1017,12 @@ class MyThread extends Thread
|
||||
mSemaphore.release(); //Отдаем семафор
|
||||
}
|
||||
|
||||
|
||||
//Выполняем задание на отправку/приём данных
|
||||
if(tsk != null)
|
||||
{
|
||||
Log.i("CCALM", "download task = "+tsk.name);
|
||||
if(tsk.name.equals("frmlocustdel_locations")){
|
||||
Log.i("CCALM", "download task = "+tsk.name + " time = " + tsk.t);
|
||||
if(tsk.name.equals("frmlocustdel")){
|
||||
Log.i("CCALM", "download task = "+tsk.name);
|
||||
}
|
||||
boolean bError=false;
|
||||
@ -1152,6 +1153,7 @@ class MyThread extends Thread
|
||||
bundle.putString("type", tsk.type); //Тип файла
|
||||
msg.setData(bundle);
|
||||
myHandle.sendMessage(msg);
|
||||
|
||||
}else{
|
||||
Log.e("CCALM", "ERROR URL = "+tsk.url+" responseCode"+String.valueOf(responseCode));
|
||||
}
|
||||
|
||||
@ -66,6 +66,8 @@ public class SetupActivity extends Activity {
|
||||
public EditText edtURL = null;
|
||||
public EditText edtSyncDays = null;
|
||||
public CheckBox cbIdentifyCountryRegion = null;
|
||||
public CheckBox cbOrderByDistance = null;
|
||||
|
||||
public CheckBox cbShowAdvancedSettings = null;
|
||||
|
||||
public final static int TASK1_CODE = 1;
|
||||
@ -292,11 +294,40 @@ public class SetupActivity extends Activity {
|
||||
editor.putString(prefName, "1"); //Default value
|
||||
else
|
||||
editor.putString(prefName, "0");
|
||||
editor.commit();
|
||||
editor.apply();
|
||||
}
|
||||
};
|
||||
cbIdentifyCountryRegion.setOnClickListener(oclBtnId);
|
||||
|
||||
|
||||
|
||||
cbOrderByDistance = (CheckBox) findViewById(R.id.cbOrderByDistance);
|
||||
|
||||
prefName = "Distance";
|
||||
prefs = getSharedPreferences("CommonPrefs", Activity.MODE_PRIVATE);
|
||||
checked = prefs.getString(prefName, "");
|
||||
if(checked.equals("") || checked.equals("1"))
|
||||
cbOrderByDistance.setChecked(true);
|
||||
else
|
||||
cbOrderByDistance.setChecked(false);
|
||||
|
||||
oclBtnId = new OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
String prefName = "Distance";
|
||||
SharedPreferences prefs = getSharedPreferences("CommonPrefs", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
if(cbOrderByDistance.isChecked())
|
||||
editor.putString(prefName, "1"); //Default value
|
||||
else
|
||||
editor.putString(prefName, "0");
|
||||
editor.apply();
|
||||
}
|
||||
};
|
||||
cbOrderByDistance.setOnClickListener(oclBtnId);
|
||||
|
||||
//Кнопка для сканирования QR кода
|
||||
btnQR = (Button) findViewById(R.id.btnQR);
|
||||
OnClickListener oclBtnQR = new OnClickListener()
|
||||
|
||||
@ -51,7 +51,7 @@ public class Tools
|
||||
public static String readInputStream(InputStream is) {
|
||||
try {
|
||||
byte[] buffer = new byte[1024];
|
||||
StringBuilder result = new StringBuilder();
|
||||
StringBuilder result = new StringBuilder(1024);
|
||||
int length;
|
||||
while ((length = is.read(buffer)) != -1) {
|
||||
result.append(new String(buffer, 0, length, "UTF-8")); // StandardCharsets.UTF_8.name() > JDK 7
|
||||
@ -208,7 +208,7 @@ public class Tools
|
||||
|
||||
public static String convertStreamToString(InputStream is, int size) throws Exception {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder sb = new StringBuilder(1024);
|
||||
String line = null;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
|
||||
16
app/src/main/java/logging/AndroidLogger.java
Normal file
16
app/src/main/java/logging/AndroidLogger.java
Normal file
@ -0,0 +1,16 @@
|
||||
package logging;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
public class AndroidLogger implements Logger {
|
||||
private final String tag;
|
||||
|
||||
public AndroidLogger(Class<?> clazz) {
|
||||
this.tag = clazz.getSimpleName();
|
||||
}
|
||||
|
||||
public void debug(String msg) { Log.d(tag, msg); }
|
||||
public void info(String msg) { Log.i(tag, msg); }
|
||||
public void warn(String msg) { Log.w(tag, msg); }
|
||||
public void error(String msg) { Log.e(tag, msg); }
|
||||
}
|
||||
12
app/src/main/java/logging/Logger.java
Normal file
12
app/src/main/java/logging/Logger.java
Normal file
@ -0,0 +1,12 @@
|
||||
package logging;
|
||||
|
||||
public interface Logger {
|
||||
void debug(String msg);
|
||||
void info(String msg);
|
||||
void warn(String msg);
|
||||
void error(String msg);
|
||||
|
||||
static Logger getLogger(Class<?> clazz) {
|
||||
return LoggerFactory.createLogger(clazz); // Подменяется реализацией
|
||||
}
|
||||
}
|
||||
21
app/src/main/java/logging/LoggerFactory.java
Normal file
21
app/src/main/java/logging/LoggerFactory.java
Normal file
@ -0,0 +1,21 @@
|
||||
package logging;
|
||||
|
||||
public class LoggerFactory {
|
||||
public static Logger createLogger(Class<?> clazz) {
|
||||
// Тут выбираешь реализацию по флагу/условию
|
||||
//if (isAndroid()) {
|
||||
return new AndroidLogger(clazz);
|
||||
//} else {
|
||||
// return new SLF4JLogger(clazz);
|
||||
//}
|
||||
}
|
||||
|
||||
private static boolean isAndroid() {
|
||||
try {
|
||||
Class.forName("android.os.Build");
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
android:screenOrientation="portrait"
|
||||
tools:context=".LocustActivity">
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustDelActivity">
|
||||
|
||||
<ScrollView
|
||||
@ -1939,7 +1940,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:visibility="gone">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
@ -1952,6 +1954,41 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/Type_of_assessed_biological_impact"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"/>
|
||||
<EditText
|
||||
android:id="@+id/edtBiologicalImpact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_row="2"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/glBiologicalImpact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<!-- CheckBox elements are created programmatically -->
|
||||
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -2053,6 +2090,14 @@
|
||||
android:text="@string/Protective_clothing"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"/>
|
||||
<EditText
|
||||
android:id="@+id/edtClothing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_row="2"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
@ -2117,14 +2162,6 @@
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="2"
|
||||
android:text="@string/Protection_is_absent" />
|
||||
<EditText
|
||||
android:id="@+id/edtClothing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_row="2"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -2182,7 +2219,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Inform_abaut_spraying"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtInform"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_row="0"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -2242,15 +2286,6 @@
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Other_people" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtInform"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_row="0"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</GridLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -2269,6 +2304,14 @@
|
||||
android:text="@string/Empty_containers"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"/>
|
||||
<EditText
|
||||
android:id="@+id/edtSafEmptyContainers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_row="0"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
@ -2325,14 +2368,6 @@
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Other" />
|
||||
<EditText
|
||||
android:id="@+id/edtSafEmptyContainers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_row="0"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
android:background="@drawable/gradient_example"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustHealthActivity">
|
||||
|
||||
<ScrollView
|
||||
@ -24,11 +25,6 @@
|
||||
android:showDividers="middle"
|
||||
android:paddingRight="@dimen/activity_vertical_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="spiEffTypeImpact" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -2526,10 +2522,11 @@
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<!--LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
@ -2550,8 +2547,63 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/Type_of_assessed_biological_impact"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||
<EditText
|
||||
android:id="@+id/edtBiologicalImpact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
<View
|
||||
android:layout_width="@dimen/activity_vertical_margin"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<GridLayout
|
||||
android:id="@+id/glEffTypeImpact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<!-- CheckBox elements are created programmatically -->
|
||||
|
||||
</GridLayout>
|
||||
<View
|
||||
android:layout_width="@dimen/activity_vertical_margin"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
android:screenOrientation="portrait"
|
||||
tools:context=".LocustActivity">
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustDelActivity">
|
||||
|
||||
<ScrollView
|
||||
@ -1807,7 +1808,8 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -1824,6 +1826,41 @@
|
||||
android:minHeight="@dimen/minHeight"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/Type_of_assessed_biological_impact"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"/>
|
||||
<EditText
|
||||
android:id="@+id/edtBiologicalImpact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_row="2"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/glBiologicalImpact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<!-- CheckBox elements are created programmatically -->
|
||||
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
@ -1928,78 +1965,6 @@
|
||||
android:text="@string/Protective_clothing"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="3"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingGoggles"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Goggles" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingMasks"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Masks" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingGloves"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Gloves" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingOveralls"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Overalls" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingCaps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Caps" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingBoots"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Boots" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingAbsent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="2"
|
||||
android:text="@string/Protection_is_absent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtClothing"
|
||||
android:layout_width="wrap_content"
|
||||
@ -2008,6 +1973,70 @@
|
||||
android:layout_row="2"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="3"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingGoggles"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Goggles" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingMasks"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Masks" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingGloves"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Gloves" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingOveralls"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Overalls" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingCaps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Caps" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingBoots"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Boots" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafClothingAbsent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="2"
|
||||
android:text="@string/Protection_is_absent" />
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -2065,69 +2094,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Inform_abaut_spraying"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformFarmer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Farmer" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformShepherd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Shepherd" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformBeekeeper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Beekeeper" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformVillager"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Villager" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformOfficial"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Official" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformOther"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Other_people" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtInform"
|
||||
android:layout_width="wrap_content"
|
||||
@ -2136,6 +2102,62 @@
|
||||
android:layout_row="0"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformFarmer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Farmer" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformShepherd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Shepherd" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformBeekeeper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Beekeeper" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformVillager"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Villager" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformOfficial"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Official" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbSafInformOther"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Other_people" />
|
||||
</GridLayout>
|
||||
|
||||
<!--LinearLayout
|
||||
@ -2181,69 +2203,6 @@
|
||||
android:text="@string/Empty_containers"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbTripleRinsed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Farmer" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbPunctured"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Shepherd" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbTakenBackToBase"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Beekeeper" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbLeftInField"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Villager" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbBuried"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Official" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbBurned"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Other" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtSafEmptyContainers"
|
||||
android:layout_width="wrap_content"
|
||||
@ -2252,6 +2211,62 @@
|
||||
android:layout_row="0"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<CheckBox
|
||||
android:id="@+id/cbTripleRinsed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Farmer" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbPunctured"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Shepherd" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbTakenBackToBase"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="0"
|
||||
android:text="@string/Beekeeper" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbLeftInField"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Villager" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbBuried"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Official" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbBurned"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_row="1"
|
||||
android:text="@string/Other" />
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
android:background="@drawable/gradient_example"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustHealthActivity">
|
||||
|
||||
<ScrollView
|
||||
@ -2416,9 +2417,10 @@
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<!--LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -2442,8 +2444,60 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/Type_of_assessed_biological_impact"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:enabled="false"/>
|
||||
<EditText
|
||||
android:id="@+id/edtBiologicalImpact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
<View
|
||||
android:layout_width="@dimen/activity_vertical_margin"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<GridLayout
|
||||
android:id="@+id/glEffTypeImpact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<!-- CheckBox elements are created programmatically -->
|
||||
|
||||
</GridLayout>
|
||||
<View
|
||||
android:layout_width="@dimen/activity_vertical_margin"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
android:background="@drawable/gradient_example"
|
||||
tools:context=".ImagePickActivity" >
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
android:screenOrientation="portrait"
|
||||
tools:context=".LocustActivity">
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustDelActivity">
|
||||
|
||||
<ScrollView
|
||||
@ -1935,7 +1936,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:visibility="gone">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
@ -1948,6 +1950,40 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/Type_of_assessed_biological_impact"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"/>
|
||||
<EditText
|
||||
android:id="@+id/edtBiologicalImpact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/glBiologicalImpact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<!-- CheckBox elements are created programmatically -->
|
||||
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -2052,6 +2088,12 @@
|
||||
android:text="@string/Protective_clothing"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"/>
|
||||
<EditText
|
||||
android:id="@+id/edtClothing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
@ -2124,14 +2166,6 @@
|
||||
android:layout_row="2"
|
||||
android:text="@string/Protection_is_absent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtClothing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_row="2"
|
||||
android:hint=""
|
||||
android:visibility="invisible" />
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -2491,6 +2525,9 @@
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
@ -9,6 +9,7 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustDelListActivity" >
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
android:background="@drawable/gradient_example"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustHealthActivity">
|
||||
|
||||
<ScrollView
|
||||
@ -2670,11 +2671,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
|
||||
|
||||
<!--LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:visibility="gone">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
@ -2694,6 +2698,55 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/Type_of_assessed_biological_impact"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||
<EditText
|
||||
android:id="@+id/edtBiologicalImpact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
<View
|
||||
android:layout_width="@dimen/activity_vertical_margin"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<GridLayout
|
||||
android:id="@+id/glBiologicalImpact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<!-- CheckBox elements are created programmatically -->
|
||||
|
||||
</GridLayout>
|
||||
<View
|
||||
android:layout_width="@dimen/activity_vertical_margin"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/button_pink_normal_start"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -2841,7 +2894,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
|
||||
|
||||
<!--LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
@ -2857,8 +2912,51 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout-->
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/Type_of_assessed_biological_impact"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||
<EditText
|
||||
android:id="@+id/edtEffTypeImpact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
<GridLayout
|
||||
android:id="@+id/glEffTypeImpact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin">
|
||||
|
||||
<!-- CheckBox elements are created programmatically -->
|
||||
|
||||
</GridLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llEffMortality2"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustHealthListActivity" >
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustListActivity" >
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -1,96 +1,80 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/gradient_example"
|
||||
tools:context=".MainActivity" >
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<!-- Progress Block -->
|
||||
<LinearLayout
|
||||
android:id="@+id/pBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvProgressInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center"
|
||||
android:text="Synchronize directories through the Internet!"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCountTasks"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/action_synchronize"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Main Form -->
|
||||
<LinearLayout
|
||||
android:id="@+id/form"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/footerBlock"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/Fields_marked_are_mandatory"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnLocust"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginLeft="62dp"
|
||||
android:layout_marginRight="62dp"
|
||||
android:layout_marginHorizontal="62dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:minHeight="70dp"
|
||||
android:text="@string/title_activity_locust"/>
|
||||
|
||||
@ -98,10 +82,8 @@
|
||||
android:id="@+id/btnLocustDel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="52dp"
|
||||
android:layout_marginLeft="62dp"
|
||||
android:layout_marginRight="62dp"
|
||||
android:layout_marginHorizontal="62dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:minHeight="70dp"
|
||||
android:text="@string/title_activity_locust_del"/>
|
||||
|
||||
@ -109,10 +91,8 @@
|
||||
android:id="@+id/btnLocustHealth"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="52dp"
|
||||
android:layout_marginLeft="62dp"
|
||||
android:layout_marginRight="62dp"
|
||||
android:layout_marginHorizontal="62dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:minHeight="70dp"
|
||||
android:text="@string/Human_Health_and_Environment_HH_Env_Monitoring_Form"/>
|
||||
|
||||
@ -120,28 +100,29 @@
|
||||
android:id="@+id/btnSetup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="52dp"
|
||||
android:layout_marginLeft="62dp"
|
||||
android:layout_marginRight="62dp"
|
||||
android:layout_marginHorizontal="62dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:minHeight="70dp"
|
||||
android:text="@string/title_activity_setup"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Footer -->
|
||||
<LinearLayout
|
||||
android:id="@+id/footerBlock"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<!-- Version -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignRight="@+id/textView1"
|
||||
android:layout_marginBottom="46dp">
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="end">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV"
|
||||
@ -157,18 +138,12 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- App ID -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/textView1"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignRight="@+id/textView1"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
android:gravity="end"
|
||||
android:paddingBottom="48dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvID"
|
||||
@ -185,4 +160,5 @@
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -9,6 +9,7 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".LocustDelListActivity" >
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -1,308 +1,257 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/gradient_example"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:configChanges = "orientation|keyboard"
|
||||
tools:context=".SetupActivity" >
|
||||
android:background="#FFFAB0">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true" >
|
||||
android:id="@+id/mainScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:padding="12dp"
|
||||
android:paddingTop="40dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/scrollView1"
|
||||
android:layout_below="@+id/scrollView1"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="32dp">
|
||||
|
||||
<Button
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnSynchronization"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:minHeight="40dp"
|
||||
android:minWidth="120dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/action_synchronize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSynchronization"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_synchronize"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="@string/action_synchronize"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/To_change_the_language_you_need_to_restart_the_application"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:textColor="#666666" />
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="0,1">
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<Button
|
||||
android:layout_marginBottom="4dp"
|
||||
android:baselineAligned="false">
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnAz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Azerbaijani" />
|
||||
<Button
|
||||
android:layout_marginRight="2dp"
|
||||
android:text="@string/Azerbaijani"
|
||||
android:textSize="12sp" />
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnAr"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Armenia" />
|
||||
</TableRow>
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<Button
|
||||
android:id="@+id/btnEn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/English" />
|
||||
<Button
|
||||
android:id="@+id/btnGr"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Georgian" />
|
||||
</TableRow>
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<Button
|
||||
android:id="@+id/btnKz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Kazakh" />
|
||||
<Button
|
||||
android:id="@+id/btnKg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Kyrgyz" />
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="@string/Armenia"
|
||||
android:textSize="12sp" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<Button
|
||||
android:id="@+id/btnDr"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:baselineAligned="false">
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnEn"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Afghan" />
|
||||
<Button
|
||||
android:id="@+id/btnRu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="2dp"
|
||||
android:text="@string/English"
|
||||
android:textSize="12sp" />
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnGr"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Russian" />
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="@string/Georgian"
|
||||
android:textSize="12sp" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<Button
|
||||
android:layout_marginBottom="4dp"
|
||||
android:baselineAligned="false">
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnKz"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="2dp"
|
||||
android:text="@string/Kazakh"
|
||||
android:textSize="12sp" />
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnKg"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="@string/Kyrgyz"
|
||||
android:textSize="12sp" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="4dp"
|
||||
android:baselineAligned="false">
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnDr"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="2dp"
|
||||
android:text="@string/Afghan"
|
||||
android:textSize="12sp" />
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnRu"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="@string/Russian"
|
||||
android:textSize="12sp" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="4dp"
|
||||
android:baselineAligned="false">
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnTj"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Tajik" />
|
||||
<Button
|
||||
android:layout_marginRight="2dp"
|
||||
android:text="@string/Tajik"
|
||||
android:textSize="12sp" />
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnTm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Turkman" />
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="@string/Turkman"
|
||||
android:textSize="12sp" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnUz"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.05"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnUz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Uzbek" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="10dp"
|
||||
android:minWidth="10dp" />
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="@string/Uzbek"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbIdentifyCountryRegion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/Identify_country_region" />
|
||||
|
||||
<LinearLayout
|
||||
<CheckBox
|
||||
android:id="@+id/cbOrderByDistance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.05"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Sort_lists_by_distance" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnQR"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:layout_margin="2dp"
|
||||
android:text="@string/Authorize_the_tablet_by_QR_code" />
|
||||
|
||||
</LinearLayout>
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnQR"
|
||||
style="@style/MyButtonTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/Authorize_the_tablet_by_QR_code" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbShowAdvancedSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Show_advanced_settings"/>
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/Show_advanced_settings" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llShowAdvancedSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/URL_path_to_the_server"
|
||||
android:textColor="#888888" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtURL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/URL_path_to_the_server"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/URL_path_to_the_server"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/Days_of_synchronization"
|
||||
android:textColor="#888888" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtSyncDays"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Days_of_synchronization"
|
||||
android:inputType="number"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtURL"
|
||||
android:hint="@string/URL_path_to_the_server"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:autofillHints=""
|
||||
android:ems="10"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textUri" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnDeleteAllData"
|
||||
style="@style/ButtonPinkTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Days_of_synchronization"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtSyncDays"
|
||||
android:hint="@string/Days_of_synchronization"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:autofillHints=""
|
||||
android:ems="10"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.05"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDeleteAllData"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:minWidth="190dp"
|
||||
android:minHeight="40dp"
|
||||
android:text="@string/Delete_all_data" />
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/Delete_all_data" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
@ -311,6 +311,7 @@
|
||||
<string name="Egg_pods_density_m2_to">Küpəciklərin sıxlığı/m² əvvəl</string>
|
||||
<string name="Hopper_density_m2_from">Sürfələrin sıxlığı/m² ilə</string>
|
||||
<string name="Hopper_density_m2_to">Sürfələrin sıxlığı/m²</string>
|
||||
<string name="Sort_lists_by_distance">Siyahıları məsafəyə görə sıralayın</string>
|
||||
<string name="Please_activate_GPS">Zəhmət olmasa GPS-i aktivləşdirin</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Planşetə QR kodu ilə icazə verin</string>
|
||||
<string name="Responsible_person_inspector">Planşet üzrə məsul şəxs-müfəttiş</string>
|
||||
|
||||
@ -322,6 +322,7 @@
|
||||
<string name="Egg_pods_density_m2_to">"Ձվապարկեր (խտություն /մ2) նախքան "</string>
|
||||
<string name="Hopper_density_m2_from">թրթուրների խտությունը (/մ²) հետ</string>
|
||||
<string name="Hopper_density_m2_to">թրթուրների խտությունը (/մ²) հետ</string>
|
||||
<string name="Sort_lists_by_distance">Դասավորել ցուցակները հեռավորության համաձայն</string>
|
||||
<string name="Please_activate_GPS">"Խնդրում ենք ակտիվացնել GPS-ը "</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Լիազորեք պլանշետը QR կոդով</string>
|
||||
<string name="Responsible_person_inspector">Պատասխանատու անձ (պլանշետի համար)</string>
|
||||
|
||||
@ -313,6 +313,7 @@
|
||||
<string name="Egg_pods_density_m2_to">"პარკუჭანები (სიმჭიდროვე/მ²) ადრე "</string>
|
||||
<string name="Hopper_density_m2_from">მატლების სიმჭიდროვე (მ²) თან</string>
|
||||
<string name="Hopper_density_m2_to">მატლების სიმჭიდროვე (მ²) ადრე</string>
|
||||
<string name="Sort_lists_by_distance">სიების დახარისხება მანძილის მიხედვით</string>
|
||||
<string name="Please_activate_GPS">"გთხოვთ გააქტიუროთ GPS "</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">ტაბლეტის ავტორიზაცია QR კოდით</string>
|
||||
<string name="Responsible_person_inspector">პასუხისმგებელი პირის ინსპექტორი</string>
|
||||
|
||||
@ -316,6 +316,7 @@
|
||||
<string name="Egg_pods_density_m2_to">Кубышкалар жыштыгы (/м²) мурун</string>
|
||||
<string name="Hopper_density_m2_from">Личинкалардын жыштыгы (/м²) менен</string>
|
||||
<string name="Hopper_density_m2_to">"Личинкалардын жыштыгы (/м²) мурун "</string>
|
||||
<string name="Sort_lists_by_distance">Тизмелерди аралыктары боюнча иреттөө</string>
|
||||
<string name="Please_activate_GPS">GPSти иштетиңиз</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Планшетке QR коду аркылуу уруксат бериңиз</string>
|
||||
<string name="Responsible_person_inspector">Планшет үчүн жооптуу (инспектор)</string>
|
||||
|
||||
@ -320,6 +320,7 @@
|
||||
<string name="Egg_pods_density_m2_to">Күбіршектер (тығыздығы/м²) бұрын</string>
|
||||
<string name="Hopper_density_m2_from">Дернәсілдердің тығыздығы (/м²) бірге</string>
|
||||
<string name="Hopper_density_m2_to">"Дернәсілдердің тығыздығы (/м²) бұрын "</string>
|
||||
<string name="Sort_lists_by_distance">Тізімдерді қашықтық бойынша сұрыптау</string>
|
||||
<string name="Please_activate_GPS">GPS-ті іске қосыңыз</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Планшетке QR коды арқылы рұқсат беріңіз</string>
|
||||
<string name="Responsible_person_inspector">Планшетке жауапты тұлға (инспектор)</string>
|
||||
|
||||
@ -291,7 +291,8 @@
|
||||
<string name="Egg_pods_density_m2_to">تعداد زه ملخ (نیچه) در متر مربع از</string>
|
||||
<string name="Hopper_density_m2_from">تراکم مچک ( / متر مربع ) سره</string>
|
||||
<string name="Hopper_density_m2_to">"تراکم مچک ( / متر مربع ) مخکې "</string>
|
||||
<string name="Please_activate_GPS">مهرباني وکړئ GPS فعال کړئ</string>
|
||||
<string name="Sort_lists_by_distance">لیستونه د واټن له مخې ترتیب کړئ</string>
|
||||
<string name="Please_activate_GPS">مهرباني وکړئ GPS فعال کړئ</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">تابلیت تان را ذریعه کیوآر کود اختیار نمائید</string>
|
||||
<string name="Responsible_person_inspector">شخص مسئول تفتیش</string>
|
||||
<string name="Organization">سازمان ها</string>
|
||||
|
||||
@ -333,6 +333,7 @@
|
||||
<string name="Egg_pods_density_m2_to">Плотность кубышек (/м²) до</string>
|
||||
<string name="Hopper_density_m2_from">Плотность личинок (/м²) от</string>
|
||||
<string name="Hopper_density_m2_to">Плотность личинок (/м²) до</string>
|
||||
<string name="Sort_lists_by_distance">Сортировать списки по расстоянию</string>
|
||||
<string name="Please_activate_GPS">Пожалуйста активируйте GPS</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Авторизовать планшет по QR коду</string>
|
||||
|
||||
|
||||
@ -324,6 +324,7 @@
|
||||
<string name="Egg_pods_density_m2_to">Кузачаҳо ( зиччи м2) пеш</string>
|
||||
<string name="Hopper_density_m2_from">Зичии кирминаҳо (/м2) бо</string>
|
||||
<string name="Hopper_density_m2_to">Зичии кирминаҳо (/м2) пеш</string>
|
||||
<string name="Sort_lists_by_distance">Рӯйхатҳоро аз рӯи масофа ҷудо кунед</string>
|
||||
<string name="Please_activate_GPS">Лутфан GPS-ро фаъол созед</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Ба планшет тавассути рамзи QR иҷозат диҳед</string>
|
||||
<string name="Responsible_person_inspector">Шахси масъули планшет</string>
|
||||
|
||||
@ -324,6 +324,7 @@
|
||||
<string name="Egg_pods_density_m2_to">Ýumurtgaly küýzejikler ýada kubyşkalar (gürlügi/m²) çenli</string>
|
||||
<string name="Hopper_density_m2_from">Liçinkalaryň gürlügi (/m²) dan</string>
|
||||
<string name="Hopper_density_m2_to">Liçinkalaryň gürlügi (/m²) çenli</string>
|
||||
<string name="Sort_lists_by_distance">Sanawlary uzaklyk boýunça tertipläň</string>
|
||||
<string name="Please_activate_GPS">GPS-i işjeňleşdirmegiňizi haýyş edýäris</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Planşedi QR kody bilen ygtyýarlandyryň</string>
|
||||
<string name="Responsible_person_inspector">Planşet boýunça jogapkär adam</string>
|
||||
|
||||
@ -325,6 +325,7 @@
|
||||
<string name="Egg_pods_density_m2_to">Ko\'zachalar zichligi (ta/m²) oldin</string>
|
||||
<string name="Hopper_density_m2_from">Lichinkalar zichligi (ta/m²) bilan</string>
|
||||
<string name="Hopper_density_m2_to">Lichinkalar zichligi (ta/m²) oldin</string>
|
||||
<string name="Sort_lists_by_distance">Roʻyxatlarni masofa boʻyicha tartiblang</string>
|
||||
<string name="Please_activate_GPS">Iltimos, GPSni faollashtiring</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Planshetga QR kod orqali avtorizatsiya qiling</string>
|
||||
<string name="Responsible_person_inspector">Planshet uchun javobgar shaxs</string>
|
||||
|
||||
@ -332,6 +332,7 @@
|
||||
<string name="title_activity_maps">Map</string>
|
||||
<string name="Show_map">Show map</string>
|
||||
<string name="Identify_country_region">Locate your country and region by GPS</string>
|
||||
<string name="Sort_lists_by_distance">Sort lists by distance</string>
|
||||
<string name="Please_activate_GPS">Please activate GPS</string>
|
||||
<string name="Authorize_the_tablet_by_QR_code">Authorize the tablet by QR code</string>
|
||||
<string name="Responsible_person_inspector">Responsible person for the tablet (inspector)</string>
|
||||
|
||||
@ -22,18 +22,21 @@
|
||||
</style>
|
||||
|
||||
<style name="MyButtonTheme" parent="@android:style/Widget.Button">
|
||||
<item name="backgroundTint">@null</item>
|
||||
<item name="android:background">@drawable/button_blue</item>
|
||||
<item name="android:textColor">@color/White</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="ButtonPinkTheme" parent="@android:style/Widget.Button">
|
||||
<item name="backgroundTint">@null</item>
|
||||
<item name="android:background">@drawable/button_pink</item>
|
||||
<item name="android:textColor">@color/White</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="MyImageButtonTheme" parent="@android:style/Widget.ImageButton">
|
||||
<item name="backgroundTint">@null</item>
|
||||
<item name="android:background">@drawable/button_blue</item>
|
||||
<item name="android:textColor">@color/White</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
|
||||
@ -4,7 +4,7 @@ buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.3.2'
|
||||
@ -18,7 +18,7 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Thu Dec 24 14:35:17 ALMT 2020
|
||||
#Mon Sep 01 19:24:02 ALMT 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0-milestone-1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
|
||||
|
||||
Reference in New Issue
Block a user