Commit 0f4feea1 by Kunj Gupta

UOFLMA-88: Fix - Not rendering full description.

parent 66e0a8f1
...@@ -188,10 +188,10 @@ public class CatalogueVariableScreen extends AppCompatActivity { ...@@ -188,10 +188,10 @@ public class CatalogueVariableScreen extends AppCompatActivity {
} }
private void createView() { private void createView() {
if(!mCatalogueVariableList.isEmpty()) {
mBottomLayout.setVisibility(View.VISIBLE);
/*For variable list */ /*For variable list */
getCustomLayout(); getCustomLayout();
if(!mCatalogueVariableList.isEmpty()) {
mBottomLayout.setVisibility(View.VISIBLE);
} else { } else {
mBottomLayout.setVisibility(View.GONE); mBottomLayout.setVisibility(View.GONE);
} }
...@@ -225,10 +225,11 @@ public class CatalogueVariableScreen extends AppCompatActivity { ...@@ -225,10 +225,11 @@ public class CatalogueVariableScreen extends AppCompatActivity {
mContainerLayout.addView(descriptionView, childControlViewLayoutParams); mContainerLayout.addView(descriptionView, childControlViewLayoutParams);
} }
if(!mCatalogueVariableList.isEmpty()) {
for (int i = 0; i < mCatalogueVariableList.size(); i++) { for (int i = 0; i < mCatalogueVariableList.size(); i++) {
CatalogueVariable catalogueVariable = mCatalogueVariableList.get(i); CatalogueVariable catalogueVariable = mCatalogueVariableList.get(i);
ViewType viewType = catalogueVariable.getType(); ViewType viewType = catalogueVariable.getType();
CatalogueLog.e("viewType: " + viewType + ", Question: "+catalogueVariable.getQuestionText() + ", Order: "+catalogueVariable.getOrder()); CatalogueLog.e("viewType: " + viewType + ", Question: " + catalogueVariable.getQuestionText() + ", Order: " + catalogueVariable.getOrder());
if (catalogueVariable.getName() == null) { if (catalogueVariable.getName() == null) {
TextView nameNullView = new TextView(CatalogueVariableScreen.this); TextView nameNullView = new TextView(CatalogueVariableScreen.this);
nameNullView.setText(R.string.name_null_view_string); nameNullView.setText(R.string.name_null_view_string);
...@@ -239,7 +240,7 @@ public class CatalogueVariableScreen extends AppCompatActivity { ...@@ -239,7 +240,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
(int) getResources().getDimension(R.dimen.small_margin), (int) getResources().getDimension(R.dimen.small_margin),
(int) getResources().getDimension(R.dimen.small_margin)); (int) getResources().getDimension(R.dimen.small_margin));
mContainerLayout.addView(nameNullView, childLabelViewLayoutParams); mContainerLayout.addView(nameNullView, childLabelViewLayoutParams);
} else if(viewType != ViewType.MACRO && viewType != ViewType.CONTAINER_START && viewType != ViewType.CONTAINER_END && viewType != ViewType.CONTAINER_SPLIT) { } else if (viewType != ViewType.MACRO && viewType != ViewType.CONTAINER_START && viewType != ViewType.CONTAINER_END && viewType != ViewType.CONTAINER_SPLIT) {
/*For MACRO, CONTAINER_START, CONTAINER_END and CONTAINER_SPLIT, there is no need to render any view*/ /*For MACRO, CONTAINER_START, CONTAINER_END and CONTAINER_SPLIT, there is no need to render any view*/
if (viewType != ViewType.LABEL && viewType != ViewType.CHECK_BOX && viewType != ViewType.BREAK) { if (viewType != ViewType.LABEL && viewType != ViewType.CHECK_BOX && viewType != ViewType.BREAK) {
/*Create label for every type*/ /*Create label for every type*/
...@@ -301,6 +302,7 @@ public class CatalogueVariableScreen extends AppCompatActivity { ...@@ -301,6 +302,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
} }
} }
} }
}
private View getErrorView() { private View getErrorView() {
TextView textView = new TextView(CatalogueVariableScreen.this); TextView textView = new TextView(CatalogueVariableScreen.this);
......
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