Commit c3018954 by Kunj Gupta

Added new layout for HRCase Variable.

parent fcec8066
...@@ -64,7 +64,6 @@ import com.vsoft.servicenow.db.managers.HRCaseUiPolicyActionManager; ...@@ -64,7 +64,6 @@ import com.vsoft.servicenow.db.managers.HRCaseUiPolicyActionManager;
import com.vsoft.servicenow.db.managers.HRCaseUiPolicyItemManager; import com.vsoft.servicenow.db.managers.HRCaseUiPolicyItemManager;
import com.vsoft.servicenow.db.managers.HRCaseVariableChoiceManager; import com.vsoft.servicenow.db.managers.HRCaseVariableChoiceManager;
import com.vsoft.servicenow.db.managers.HRCaseVariableManager; 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.HRCaseAttachment;
import com.vsoft.servicenow.db.models.HRCaseItem; import com.vsoft.servicenow.db.models.HRCaseItem;
import com.vsoft.servicenow.db.models.HRCaseItemInput; import com.vsoft.servicenow.db.models.HRCaseItemInput;
...@@ -111,8 +110,8 @@ import butterknife.OnClick; ...@@ -111,8 +110,8 @@ import butterknife.OnClick;
public class HRCaseVariableScreen extends HandleNotificationActivity { public class HRCaseVariableScreen extends HandleNotificationActivity {
@BindView(R.id.tool_bar_view) Toolbar mToolbar; @BindView(R.id.tool_bar_view) Toolbar mToolbar;
@BindView(R.id.variable_screen_container_layout) LinearLayout mContainerLayout; @BindView(R.id.hr_case_variable_screen_container_layout) LinearLayout mContainerLayout;
@BindView(R.id.variable_screen_bottom_layout) RelativeLayout mBottomLayout; @BindView(R.id.hr_case_variable_screen_bottom_layout) RelativeLayout mBottomLayout;
@BindView(R.id.toolbar_refresh_icon) ImageView mRefreshIcon; @BindView(R.id.toolbar_refresh_icon) ImageView mRefreshIcon;
@BindView(R.id.toolbar_progress_icon) ProgressBar mProgressBar; @BindView(R.id.toolbar_progress_icon) ProgressBar mProgressBar;
...@@ -139,7 +138,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity { ...@@ -139,7 +138,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.catalogue_variable_screen); setContentView(R.layout.hr_case_variable_screen);
ButterKnife.bind(this); ButterKnife.bind(this);
mApplication = (CatalogueApplication) getApplication(); mApplication = (CatalogueApplication) getApplication();
...@@ -185,7 +184,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity { ...@@ -185,7 +184,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
if (mApplication.isNetConnected()) { if (mApplication.isNetConnected()) {
isProgressRequire = mHRCaseVariableList.isEmpty(); isProgressRequire = mHRCaseVariableList.isEmpty();
new FetchCatalogueVariable().execute(); new FetchHRCaseVariable().execute();
} else if(mHRCaseVariableList.isEmpty()) { } else if(mHRCaseVariableList.isEmpty()) {
DialogUtils.showNoConnectionDialog(HRCaseVariableScreen.this); DialogUtils.showNoConnectionDialog(HRCaseVariableScreen.this);
} }
...@@ -196,7 +195,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity { ...@@ -196,7 +195,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
if(mApplication.isNetConnected()) { if(mApplication.isNetConnected()) {
/*Reset variable*/ /*Reset variable*/
mFormHasChanged = false; mFormHasChanged = false;
new FetchCatalogueVariable().execute(); new FetchHRCaseVariable().execute();
} else { } else {
DialogUtils.showNoConnectionDialogWithCloseActivity(HRCaseVariableScreen.this); DialogUtils.showNoConnectionDialogWithCloseActivity(HRCaseVariableScreen.this);
} }
...@@ -222,7 +221,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity { ...@@ -222,7 +221,7 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
} }
} }
class FetchCatalogueVariable extends AsyncTask<String, Void, SyncStatus> { class FetchHRCaseVariable extends AsyncTask<String, Void, SyncStatus> {
private ProgressDialog progressDialog; private ProgressDialog progressDialog;
private SyncStatus syncStatus = SyncStatus.FAIL; private SyncStatus syncStatus = SyncStatus.FAIL;
...@@ -580,13 +579,13 @@ public class HRCaseVariableScreen extends HandleNotificationActivity { ...@@ -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) { void submitOnClicked(View v) {
Util.hideSoftKeyboard(HRCaseVariableScreen.this, v); Util.hideSoftKeyboard(HRCaseVariableScreen.this, v);
saveFormData(); saveFormData();
} }
@OnClick(R.id.variable_screen_back_text_view) @OnClick(R.id.hr_case_variable_screen_back_text_view)
void backOnClicked() { void backOnClicked() {
showNavigationBackDialog(); showNavigationBackDialog();
} }
......
<?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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment