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
7062c7e8
authored
Oct 04, 2016
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UOFLMA-111: Fixed - Need to show full names of catalog items.
parent
f288a9f7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
8 deletions
app/src/main/java/com/vsoft/uoflservicenow/ui/CatalogueVariableScreen.java
app/src/main/res/layout/catalogue_category_adapter.xml
app/src/main/res/layout/catalogue_category_item_adapter.xml
app/src/main/res/values/strings.xml
app/src/main/java/com/vsoft/uoflservicenow/ui/CatalogueVariableScreen.java
View file @
7062c7e8
...
@@ -30,6 +30,7 @@ import android.support.v7.widget.Toolbar;
...
@@ -30,6 +30,7 @@ import android.support.v7.widget.Toolbar;
import
android.text.Html
;
import
android.text.Html
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.text.method.LinkMovementMethod
;
import
android.text.method.LinkMovementMethod
;
import
android.util.TypedValue
;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.view.MotionEvent
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.View
;
...
@@ -134,7 +135,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -134,7 +135,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
if
(
actionBar
!=
null
)
{
if
(
actionBar
!=
null
)
{
actionBar
.
setDisplayHomeAsUpEnabled
(
true
);
actionBar
.
setDisplayHomeAsUpEnabled
(
true
);
actionBar
.
setElevation
(
0
);
actionBar
.
setElevation
(
0
);
actionBar
.
setTitle
(
mCatalogueItemTitle
);
actionBar
.
setTitle
(
R
.
string
.
variable_form_header_string
);
actionBar
.
setDisplayShowHomeEnabled
(
false
);
actionBar
.
setDisplayShowHomeEnabled
(
false
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
}
...
@@ -194,7 +195,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -194,7 +195,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
createView
();
createView
();
}
}
}
else
{
}
else
{
showErrorDialog
(
R
.
string
.
failed_to_fetch_catalogue_form_string
);
show
FetchVariable
ErrorDialog
(
R
.
string
.
failed_to_fetch_catalogue_form_string
);
}
}
}
}
}
}
...
@@ -243,6 +244,16 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -243,6 +244,16 @@ public class CatalogueVariableScreen extends AppCompatActivity {
LinearLayout
.
LayoutParams
childLabelViewLayoutParams
=
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
,
LinearLayout
.
LayoutParams
childLabelViewLayoutParams
=
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
,
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
);
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
);
if
(
mCatalogueItemTitle
!=
null
&&
!
mCatalogueItemTitle
.
isEmpty
())
{
TextView
headerView
=
new
TextView
(
CatalogueVariableScreen
.
this
);
headerView
.
setPadding
(
0
,
0
,
0
,
(
int
)
getResources
().
getDimension
(
R
.
dimen
.
normal_margin
));
headerView
.
setTypeface
(
null
,
Typeface
.
BOLD
);
headerView
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_PX
,
getResources
().
getDimension
(
R
.
dimen
.
normal_text_size
));
headerView
.
setTextColor
(
ContextCompat
.
getColor
(
CatalogueVariableScreen
.
this
,
android
.
R
.
color
.
black
));
headerView
.
setText
(
mCatalogueItemTitle
);
mContainerLayout
.
addView
(
headerView
,
childControlViewLayoutParams
);
}
/*Added item Description in form*/
/*Added item Description in form*/
if
(
mCatalogueItemShortDescription
!=
null
&&
!
mCatalogueItemShortDescription
.
isEmpty
())
{
if
(
mCatalogueItemShortDescription
!=
null
&&
!
mCatalogueItemShortDescription
.
isEmpty
())
{
TextView
shortDescriptionView
=
new
TextView
(
CatalogueVariableScreen
.
this
);
TextView
shortDescriptionView
=
new
TextView
(
CatalogueVariableScreen
.
this
);
...
@@ -596,7 +607,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -596,7 +607,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
if
(
syncStatus
==
SyncStatus
.
SUCCESS
)
{
if
(
syncStatus
==
SyncStatus
.
SUCCESS
)
{
showSubmissionDialog
();
showSubmissionDialog
();
}
else
{
}
else
{
showErrorDialog
(
R
.
string
.
failed_to_submit_form_string
);
show
Submit
ErrorDialog
(
R
.
string
.
failed_to_submit_form_string
);
}
}
}
}
}
}
...
@@ -619,12 +630,13 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -619,12 +630,13 @@ public class CatalogueVariableScreen extends AppCompatActivity {
alert
.
show
();
alert
.
show
();
}
}
private
void
showErrorDialog
(
int
message
)
{
private
void
show
FetchVariable
ErrorDialog
(
int
message
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
builder
.
setMessage
(
message
)
builder
.
setMessage
(
message
)
.
setCancelable
(
false
)
.
setCancelable
(
false
)
.
setPositiveButton
(
android
.
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
()
{
.
setPositiveButton
(
android
.
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
dialog
.
dismiss
();
finish
();
finish
();
}
}
});
});
...
@@ -632,6 +644,19 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -632,6 +644,19 @@ public class CatalogueVariableScreen extends AppCompatActivity {
alert
.
show
();
alert
.
show
();
}
}
private
void
showSubmitErrorDialog
(
int
message
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
builder
.
setMessage
(
message
)
.
setCancelable
(
false
)
.
setPositiveButton
(
android
.
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
dialog
.
dismiss
();
}
});
AlertDialog
alert
=
builder
.
create
();
alert
.
show
();
}
private
String
getMonth
(
int
month
)
{
private
String
getMonth
(
int
month
)
{
return
Constants
.
month
[
month
];
return
Constants
.
month
[
month
];
}
}
...
...
app/src/main/res/layout/catalogue_category_adapter.xml
View file @
7062c7e8
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:textSize=
"@dimen/normal_text_size"
android:textSize=
"@dimen/normal_text_size"
android:textStyle=
"bold"
android:textStyle=
"bold"
/>
android:lines=
"1"
/>
<TextView
<TextView
android:id=
"@+id/catalogue_category_adapter_des_tv"
android:id=
"@+id/catalogue_category_adapter_des_tv"
...
...
app/src/main/res/layout/catalogue_category_item_adapter.xml
View file @
7062c7e8
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:textSize=
"@dimen/normal_text_size"
android:textSize=
"@dimen/normal_text_size"
android:textStyle=
"bold"
android:textStyle=
"bold"
/>
android:lines=
"1"
/>
<TextView
<TextView
android:id=
"@+id/catalogue_category_item_adapter_des_tv"
android:id=
"@+id/catalogue_category_item_adapter_des_tv"
...
...
app/src/main/res/values/strings.xml
View file @
7062c7e8
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
<!--Variable Screen-->
<!--Variable Screen-->
<string
name=
"variable_form_misc_info_string"
>
%1$s [add %2$s]
</string>
<string
name=
"variable_form_misc_info_string"
>
%1$s [add %2$s]
</string>
<string
name=
"variable_form_header_string"
>
Submit Order
</string>
<string
name=
"variable_form_reference_dialog_title_string"
>
Search \'%s\'
</string>
<string
name=
"variable_form_reference_dialog_title_string"
>
Search \'%s\'
</string>
<string
name=
"variable_form_radio_text_string"
>
%d
</string>
<string
name=
"variable_form_radio_text_string"
>
%d
</string>
<string
name=
"variable_form_ui_page_button_label_string"
>
Add Attachment
</string>
<string
name=
"variable_form_ui_page_button_label_string"
>
Add Attachment
</string>
...
...
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