Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c3018954
authored
Apr 13, 2018
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Added new layout for HRCase Variable.
parent
fcec8066
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
9 deletions
app/src/main/java/com/vsoft/servicenow/ui/HRCaseVariableScreen.java
app/src/main/res/layout/hr_case_variable_screen.xml
app/src/main/java/com/vsoft/servicenow/ui/HRCaseVariableScreen.java
View file @
c3018954
...
...
@@ -64,7 +64,6 @@ import com.vsoft.servicenow.db.managers.HRCaseUiPolicyActionManager;
import
com.vsoft.servicenow.db.managers.HRCaseUiPolicyItemManager
;
import
com.vsoft.servicenow.db.managers.HRCaseVariableChoiceManager
;
import
com.vsoft.servicenow.db.managers.HRCaseVariableManager
;
import
com.vsoft.servicenow.db.models.CatalogueVariable
;
import
com.vsoft.servicenow.db.models.HRCaseAttachment
;
import
com.vsoft.servicenow.db.models.HRCaseItem
;
import
com.vsoft.servicenow.db.models.HRCaseItemInput
;
...
...
@@ -111,8 +110,8 @@ import butterknife.OnClick;
public
class
HRCaseVariableScreen
extends
HandleNotificationActivity
{
@BindView
(
R
.
id
.
tool_bar_view
)
Toolbar
mToolbar
;
@BindView
(
R
.
id
.
variable_screen_container_layout
)
LinearLayout
mContainerLayout
;
@BindView
(
R
.
id
.
variable_screen_bottom_layout
)
RelativeLayout
mBottomLayout
;
@BindView
(
R
.
id
.
hr_case_
variable_screen_container_layout
)
LinearLayout
mContainerLayout
;
@BindView
(
R
.
id
.
hr_case_
variable_screen_bottom_layout
)
RelativeLayout
mBottomLayout
;
@BindView
(
R
.
id
.
toolbar_refresh_icon
)
ImageView
mRefreshIcon
;
@BindView
(
R
.
id
.
toolbar_progress_icon
)
ProgressBar
mProgressBar
;
...
...
@@ -139,7 +138,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
// TODO Auto-generated method stub
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
catalogu
e_variable_screen
);
setContentView
(
R
.
layout
.
hr_cas
e_variable_screen
);
ButterKnife
.
bind
(
this
);
mApplication
=
(
CatalogueApplication
)
getApplication
();
...
...
@@ -185,7 +184,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
if
(
mApplication
.
isNetConnected
())
{
isProgressRequire
=
mHRCaseVariableList
.
isEmpty
();
new
Fetch
Catalogu
eVariable
().
execute
();
new
Fetch
HRCas
eVariable
().
execute
();
}
else
if
(
mHRCaseVariableList
.
isEmpty
())
{
DialogUtils
.
showNoConnectionDialog
(
HRCaseVariableScreen
.
this
);
}
...
...
@@ -196,7 +195,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
if
(
mApplication
.
isNetConnected
())
{
/*Reset variable*/
mFormHasChanged
=
false
;
new
Fetch
Catalogu
eVariable
().
execute
();
new
Fetch
HRCas
eVariable
().
execute
();
}
else
{
DialogUtils
.
showNoConnectionDialogWithCloseActivity
(
HRCaseVariableScreen
.
this
);
}
...
...
@@ -222,7 +221,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
}
}
class
Fetch
Catalogu
eVariable
extends
AsyncTask
<
String
,
Void
,
SyncStatus
>
{
class
Fetch
HRCas
eVariable
extends
AsyncTask
<
String
,
Void
,
SyncStatus
>
{
private
ProgressDialog
progressDialog
;
private
SyncStatus
syncStatus
=
SyncStatus
.
FAIL
;
...
...
@@ -580,13 +579,13 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
}
}
@OnClick
(
R
.
id
.
variable_screen_submit_text_view
)
@OnClick
(
R
.
id
.
hr_case_
variable_screen_submit_text_view
)
void
submitOnClicked
(
View
v
)
{
Util
.
hideSoftKeyboard
(
HRCaseVariableScreen
.
this
,
v
);
saveFormData
();
}
@OnClick
(
R
.
id
.
variable_screen_back_text_view
)
@OnClick
(
R
.
id
.
hr_case_
variable_screen_back_text_view
)
void
backOnClicked
()
{
showNavigationBackDialog
();
}
...
...
app/src/main/res/layout/hr_case_variable_screen.xml
0 → 100644
View file @
c3018954
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
style=
"@style/LightBackgroundStyle"
android:weightSum=
"10"
>
<include
layout=
"@layout/toolbar_with_refresh_option"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:padding=
"@dimen/normal_margin"
>
<ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@android:color/white"
android:requiresFadingEdge=
"vertical"
android:scrollbars=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@android:color/white"
android:orientation=
"vertical"
android:padding=
"@dimen/normal_margin"
>
<LinearLayout
android:id=
"@+id/hr_case_variable_screen_container_layout"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
/>
<RelativeLayout
android:id=
"@+id/hr_case_variable_screen_bottom_layout"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:visibility=
"visible"
>
<TextView
android:id=
"@+id/hr_case_variable_screen_submit_text_view"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"@dimen/normal_margin"
android:background=
"@drawable/submit_button_bg_with_border"
android:paddingBottom=
"@dimen/normal_margin"
android:paddingLeft=
"@dimen/large_margin"
android:paddingRight=
"@dimen/large_margin"
android:paddingTop=
"@dimen/normal_margin"
android:text=
"@string/submit_string"
android:textColor=
"@android:color/white"
/>
<TextView
android:id=
"@+id/hr_case_variable_screen_back_text_view"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/normal_margin"
android:layout_toLeftOf=
"@id/hr_case_variable_screen_submit_text_view"
android:background=
"@drawable/back_button_bg_with_border"
android:paddingBottom=
"@dimen/normal_margin"
android:paddingLeft=
"@dimen/large_margin"
android:paddingRight=
"@dimen/large_margin"
android:paddingTop=
"@dimen/normal_margin"
android:text=
"@string/back_string"
android:textColor=
"@android:color/white"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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