Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Mobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Agendador
Mobile
Commits
58306e25
Commit
58306e25
authored
Nov 21, 2017
by
Lucas Braz Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Layout fix & minor bug fix on schedulesHistoryActivity
Signed-off-by:
Lucas B. Cunha
<
lbc16@inf.ufpr.br
>
parent
338c2033
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
40 additions
and
26 deletions
+40
-26
app/src/main/java/br/ufpr/c3sl/agendador/agendador/SchedulesHistoryActivity.java
...pr/c3sl/agendador/agendador/SchedulesHistoryActivity.java
+9
-8
app/src/main/java/br/ufpr/c3sl/agendador/agendador/network/ApiUtils.java
...va/br/ufpr/c3sl/agendador/agendador/network/ApiUtils.java
+2
-2
app/src/main/java/br/ufpr/c3sl/agendador/agendador/presenters/SchedulesHistoryPresenter.java
...dador/agendador/presenters/SchedulesHistoryPresenter.java
+3
-0
app/src/main/res/drawable/red_text_color.xml
app/src/main/res/drawable/red_text_color.xml
+9
-0
app/src/main/res/layout/content_schedules_history.xml
app/src/main/res/layout/content_schedules_history.xml
+1
-1
app/src/main/res/menu/account_menu.xml
app/src/main/res/menu/account_menu.xml
+6
-8
app/src/main/res/menu/dependent_menu.xml
app/src/main/res/menu/dependent_menu.xml
+1
-1
app/src/main/res/menu/main_menu.xml
app/src/main/res/menu/main_menu.xml
+3
-6
app/src/main/res/values/colors.xml
app/src/main/res/values/colors.xml
+2
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+4
-0
No files found.
app/src/main/java/br/ufpr/c3sl/agendador/agendador/SchedulesHistoryActivity.java
View file @
58306e25
...
...
@@ -188,17 +188,17 @@ public class SchedulesHistoryActivity extends AppCompatActivity implements Navig
sp_situation
=
(
Spinner
)
findViewById
(
R
.
id
.
spnr_history_situation
);
sp_situation
.
setEnabled
(
false
);
final
String
[]
sector
=
{
""
,
getResources
().
getString
(
R
.
string
.
spinner_
sector_hint
)};
final
String
[]
sector
=
{
""
,
getResources
().
getString
(
R
.
string
.
spinner_
no_filter
)};
HintAdapter
sectorAdapter
=
new
HintAdapter
(
this
,
android
.
R
.
layout
.
simple_list_item_1
,
sector
);
sp_sector
.
setAdapter
(
sectorAdapter
);
sp_sector
.
setSelection
(
sectorAdapter
.
getCount
());
final
String
[]
types
=
{
""
,
getResources
().
getString
(
R
.
string
.
spinner_
type_hint
)};
final
String
[]
types
=
{
""
,
getResources
().
getString
(
R
.
string
.
spinner_
no_filter
)};
HintAdapter
adapterType
=
new
HintAdapter
(
this
,
android
.
R
.
layout
.
simple_list_item_1
,
types
);
sp_serviceType
.
setAdapter
(
adapterType
);
sp_serviceType
.
setSelection
(
adapterType
.
getCount
());
final
String
[]
locations
=
{
""
,
getResources
().
getString
(
R
.
string
.
spinner_
place_hint
)};
final
String
[]
locations
=
{
""
,
getResources
().
getString
(
R
.
string
.
spinner_
no_filter
)};
HintAdapter
adapterLocation
=
new
HintAdapter
(
this
,
android
.
R
.
layout
.
simple_list_item_1
,
locations
);
sp_servicePlaces
.
setAdapter
(
adapterLocation
);
sp_servicePlaces
.
setSelection
(
adapterLocation
.
getCount
());
...
...
@@ -237,7 +237,8 @@ public class SchedulesHistoryActivity extends AppCompatActivity implements Navig
bt_clear
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
onSuccessfulSectorRequest
(
filters
);
if
(
filters
!=
null
)
onSuccessfulSectorRequest
(
filters
);
}
});
...
...
@@ -782,7 +783,7 @@ public class SchedulesHistoryActivity extends AppCompatActivity implements Navig
String
[]
servicePlacesNamesArray
;
String
[]
situationNamesArray
;
if
(
filters
.
getSectors
().
size
()
>
0
){
if
(
filters
.
getSectors
()
!=
null
&&
filters
.
getSectors
()
.
size
()
>
0
){
sectorsNamesArray
=
new
String
[
filters
.
getSectors
().
size
()
+
1
];
sectorsIdArray
=
new
long
[
filters
.
getSectors
().
size
()
+
1
];
...
...
@@ -802,7 +803,7 @@ public class SchedulesHistoryActivity extends AppCompatActivity implements Navig
sectorsIdArray
[
0
]
=
-
1
;
}
if
(
filters
.
getServiceTypes
().
size
()
>
0
){
if
(
filters
.
getServiceTypes
()
!=
null
&&
filters
.
getServiceTypes
()
.
size
()
>
0
){
serviceTypesNamesArray
=
new
String
[
filters
.
getServiceTypes
().
size
()
+
1
];
serviceTypesIdArray
=
new
long
[
filters
.
getServiceTypes
().
size
()
+
1
];
...
...
@@ -821,7 +822,7 @@ public class SchedulesHistoryActivity extends AppCompatActivity implements Navig
serviceTypesIdArray
[
0
]
=
-
1
;
}
if
(
filters
.
getServicePlaces
().
size
()
>
0
){
if
(
filters
.
getServicePlaces
()
!=
null
&&
filters
.
getServicePlaces
()
.
size
()
>
0
){
servicePlacesNamesArray
=
new
String
[
filters
.
getServicePlaces
().
size
()
+
1
];
servicePlacesIdArray
=
new
long
[
filters
.
getServicePlaces
().
size
()
+
1
];
...
...
@@ -841,7 +842,7 @@ public class SchedulesHistoryActivity extends AppCompatActivity implements Navig
}
if
(
filters
.
getS
ituationList
().
size
()
>
0
){
if
(
filters
.
getS
ervicePlaces
()
!=
null
&&
filters
.
getServicePlaces
().
size
()
>
0
){
situationNamesArray
=
new
String
[
filters
.
getSituationList
().
size
()
+
1
];
situationIdArray
=
new
long
[
filters
.
getSituationList
().
size
()
+
1
];
...
...
app/src/main/java/br/ufpr/c3sl/agendador/agendador/network/ApiUtils.java
View file @
58306e25
...
...
@@ -14,8 +14,8 @@ import retrofit2.converter.gson.GsonConverterFactory;
*/
public
abstract
class
ApiUtils
{
public
static
final
String
BASE_URL
=
"http://10.0.2.2:3000/v1/"
;
//
public static final String BASE_URL = "http://newcastle.c3sl.ufpr.br/develop/v1/";
//
public static final String BASE_URL = "http://10.0.2.2:3000/v1/";
public
static
final
String
BASE_URL
=
"http://newcastle.c3sl.ufpr.br/develop/v1/"
;
public
static
ApiEndpoints
request
(
final
Map
<
String
,
String
>
header
)
{
OkHttpClient
.
Builder
httpClient
=
new
OkHttpClient
.
Builder
();
...
...
app/src/main/java/br/ufpr/c3sl/agendador/agendador/presenters/SchedulesHistoryPresenter.java
View file @
58306e25
...
...
@@ -62,6 +62,9 @@ public class SchedulesHistoryPresenter extends BasePresenter<SchedulesHistoryAct
default
:
Log
.
e
(
"Server response"
,
getClass
().
getName
()
+
": ERRO:"
+
status
);
presenter
.
view
().
setConnectionError
(
true
);
presenter
.
view
().
setProgressBar
(
false
);
presenter
.
view
().
enableSpinners
(
false
);
presenter
.
view
().
enableButtons
(
false
);
break
;
}
...
...
app/src/main/res/drawable/red_text_color.xml
0 → 100644
View file @
58306e25
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"false"
android:color=
"@color/disabled_red_text"
/>
<item
android:color=
"@color/enabled_red_text"
/>
</selector>
\ No newline at end of file
app/src/main/res/layout/content_schedules_history.xml
View file @
58306e25
...
...
@@ -148,7 +148,7 @@
android:layout_marginStart=
"5dp"
android:padding=
"5dp"
android:background=
"@drawable/gray_container_shape"
android:textColor=
"@
color/colorRed
"
android:textColor=
"@
drawable/red_text_color
"
android:text=
"@string/reset_fields"
/>
</LinearLayout>
...
...
app/src/main/res/menu/account_menu.xml
View file @
58306e25
...
...
@@ -3,15 +3,13 @@
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/btn_edit_account"
android:title=
"Editar"
android:icon=
"@drawable/ic_edit_account"
app:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/btn_sync_account"
android:title=
"
Sincronizar
"
android:title=
"
@string/menu_sync
"
android:icon=
"@android:drawable/stat_notify_sync_noanim"
app:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/configuration_actionbtn"
android:title=
"Configurações"
app:showAsAction=
"never"
/>
<item
android:id=
"@+id/btn_edit_account"
android:title=
"@string/menu_edit"
android:icon=
"@drawable/ic_edit_account"
app:showAsAction=
"ifRoom"
/>
</menu>
\ No newline at end of file
app/src/main/res/menu/dependent_menu.xml
View file @
58306e25
...
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/bt_edit_dependent"
android:title=
"
Editar
"
android:title=
"
@string/menu_edit
"
android:icon=
"@drawable/ic_edit_account"
app:showAsAction=
"ifRoom"
/>
</menu>
\ No newline at end of file
app/src/main/res/menu/main_menu.xml
View file @
58306e25
...
...
@@ -4,15 +4,12 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/notification_actionbtn"
android:title=
"
Notificaçõe
s"
android:title=
"
@string/menu_notification
s"
android:icon=
"@drawable/ic_notification_bell"
app:showAsAction=
"always"
/>
<item
android:id=
"@+id/logout_actionbtn"
android:title=
"
Sair
"
android:title=
"
@string/menu_sign_out
"
android:icon=
"@drawable/ic_logout"
app:showAsAction=
"always"
/>
<item
android:id=
"@+id/configuration_actionbtn"
android:title=
"Configurações"
app:showAsAction=
"never"
/>
app:showAsAction=
"ifRoom"
/>
</menu>
\ No newline at end of file
app/src/main/res/values/colors.xml
View file @
58306e25
...
...
@@ -3,6 +3,8 @@
<color
name=
"colorGray"
>
#EEEEED
</color>
<color
name=
"colorBlack"
>
#2B2B2B
</color>
<color
name=
"colorRed"
>
#E73C3B
</color>
<color
name=
"enabled_red_text"
>
#E73C3B
</color>
<color
name=
"disabled_red_text"
>
#e8b3b2
</color>
<color
name=
"colorGreen"
>
#92BF28
</color>
<color
name=
"colorWhite"
>
#ffffff
</color>
<color
name=
"colorDisabled"
>
#aaaaaa
</color>
...
...
app/src/main/res/values/strings.xml
View file @
58306e25
...
...
@@ -199,5 +199,9 @@
<string
name=
"calendar_header_hour"
>
%s , %s %s - %s
</string>
<string
name=
"calendar_header_basic"
>
%s , %s %s
</string>
<string
name=
"schedule_confirmation_situation"
>
6.Situação:
</string>
<string
name=
"menu_notifications"
>
Notificações
</string>
<string
name=
"menu_sign_out"
>
Sair
</string>
<string
name=
"menu_edit"
>
Editar
</string>
<string
name=
"menu_sync"
>
Sincronizar
</string>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment