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;
import
android.text.Html
;
import
android.text.TextUtils
;
import
android.text.method.LinkMovementMethod
;
import
android.util.TypedValue
;
import
android.view.MenuItem
;
import
android.view.MotionEvent
;
import
android.view.View
;
...
...
@@ -134,7 +135,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
if
(
actionBar
!=
null
)
{
actionBar
.
setDisplayHomeAsUpEnabled
(
true
);
actionBar
.
setElevation
(
0
);
actionBar
.
setTitle
(
mCatalogueItemTitle
);
actionBar
.
setTitle
(
R
.
string
.
variable_form_header_string
);
actionBar
.
setDisplayShowHomeEnabled
(
false
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
...
...
@@ -194,7 +195,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
createView
();
}
}
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 {
LinearLayout
.
LayoutParams
childLabelViewLayoutParams
=
new
LinearLayout
.
LayoutParams
(
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*/
if
(
mCatalogueItemShortDescription
!=
null
&&
!
mCatalogueItemShortDescription
.
isEmpty
())
{
TextView
shortDescriptionView
=
new
TextView
(
CatalogueVariableScreen
.
this
);
...
...
@@ -596,7 +607,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
if
(
syncStatus
==
SyncStatus
.
SUCCESS
)
{
showSubmissionDialog
();
}
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 {
alert
.
show
();
}
private
void
showErrorDialog
(
int
message
)
{
private
void
show
FetchVariable
ErrorDialog
(
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
();
finish
();
}
});
...
...
@@ -632,6 +644,19 @@ public class CatalogueVariableScreen extends AppCompatActivity {
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
)
{
return
Constants
.
month
[
month
];
}
...
...
app/src/main/res/layout/catalogue_category_adapter.xml
View file @
7062c7e8
...
...
@@ -29,8 +29,7 @@
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:textSize=
"@dimen/normal_text_size"
android:textStyle=
"bold"
android:lines=
"1"
/>
android:textStyle=
"bold"
/>
<TextView
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 @@
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:textSize=
"@dimen/normal_text_size"
android:textStyle=
"bold"
android:lines=
"1"
/>
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/catalogue_category_item_adapter_des_tv"
...
...
app/src/main/res/values/strings.xml
View file @
7062c7e8
...
...
@@ -51,6 +51,7 @@
<!--Variable Screen-->
<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_radio_text_string"
>
%d
</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