Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
e64a590e
Commit
e64a590e
authored
Oct 05, 2018
by
Preetam Ozarde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fragment Overlapping
parent
be6dd191
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
4 deletions
+20
-4
app/build.gradle
app/build.gradle
+1
-0
app/src/main/java/app/insti/adapter/ComplaintDetailsPagerAdapter.java
.../java/app/insti/adapter/ComplaintDetailsPagerAdapter.java
+11
-2
app/src/main/java/app/insti/fragment/ComplaintFragment.java
app/src/main/java/app/insti/fragment/ComplaintFragment.java
+5
-2
app/src/main/java/app/insti/fragment/FileComplaintFragment.java
...c/main/java/app/insti/fragment/FileComplaintFragment.java
+2
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/build.gradle
View file @
e64a590e
...
...
@@ -52,5 +52,6 @@ dependencies {
implementation
"ru.noties:markwon:${markwonVersion}"
implementation
"com.github.Cutta:TagView:${tagViewVersion}"
implementation
"me.relex:circleindicator:${circleIndicatorVersion}"
implementation
'com.android.support:support-v4:28.0.0'
}
apply
plugin:
'com.google.gms.google-services'
app/src/main/java/app/insti/adapter/ComplaintDetailsPagerAdapter.java
View file @
e64a590e
...
...
@@ -7,6 +7,7 @@ import android.support.v4.app.FragmentPagerAdapter;
import
app.insti.api.model.Venter
;
import
app.insti.fragment.DetailedComplaintFragment
;
import
app.insti.fragment.RelevantComplaintsFragment
;
/**
* Created by Shivam Sharma on 19-09-2018.
...
...
@@ -14,6 +15,7 @@ import app.insti.fragment.DetailedComplaintFragment;
public
class
ComplaintDetailsPagerAdapter
extends
FragmentPagerAdapter
{
private
static
final
String
TAG
=
ComplaintDetailsPagerAdapter
.
class
.
getSimpleName
();
Venter
.
Complaint
detailedComplaint
;
Context
context
;
String
sessionid
,
complaintid
,
userid
;
...
...
@@ -32,6 +34,8 @@ public class ComplaintDetailsPagerAdapter extends FragmentPagerAdapter {
switch
(
position
)
{
case
0
:
return
DetailedComplaintFragment
.
getInstance
(
sessionid
,
complaintid
,
userid
);
case
1
:
return
RelevantComplaintsFragment
.
getInstance
(
sessionid
,
userid
);
default
:
return
DetailedComplaintFragment
.
getInstance
(
sessionid
,
complaintid
,
userid
);
}
...
...
@@ -39,11 +43,16 @@ public class ComplaintDetailsPagerAdapter extends FragmentPagerAdapter {
@Override
public
CharSequence
getPageTitle
(
int
position
)
{
return
"Complaint Details"
;
if
(
position
==
0
){
return
"Complaint Details"
;
}
else
{
return
"Relevant Complaints"
;
}
}
@Override
public
int
getCount
()
{
return
1
;
/* Update as 2 on adding RelevantComplints*/
return
2
;
}
}
app/src/main/java/app/insti/fragment/ComplaintFragment.java
View file @
e64a590e
...
...
@@ -3,13 +3,16 @@ package app.insti.fragment;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.design.widget.AppBarLayout
;
import
android.support.design.widget.CollapsingToolbarLayout
;
import
android.support.design.widget.TabLayout
;
import
android.support.v4.app.FragmentManager
;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v4.view.ViewPager
;
import
android.support.v7.widget.Toolbar
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -36,6 +39,7 @@ public class ComplaintFragment extends BaseFragment {
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_complaint
,
container
,
false
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
...
...
@@ -53,7 +57,6 @@ public class ComplaintFragment extends BaseFragment {
buttonVentIssues
=
view
.
findViewById
(
R
.
id
.
buttonVentIssues
);
buttonVentIssues
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
@@ -61,7 +64,7 @@ public class ComplaintFragment extends BaseFragment {
fileComplaintFragment
.
setArguments
(
getArguments
());
FragmentTransaction
fragmentTransaction
=
getFragmentManager
().
beginTransaction
();
fragmentTransaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fileComplaintFragment
,
fileComplaintFragment
.
getTag
());
fragmentTransaction
.
addToBackStack
(
fileComplaintFragment
.
getTag
()
).
commit
();
fragmentTransaction
.
addToBackStack
(
"ComplaintFragment"
).
commit
();
}
});
...
...
app/src/main/java/app/insti/fragment/FileComplaintFragment.java
View file @
e64a590e
...
...
@@ -605,6 +605,8 @@ public class FileComplaintFragment extends Fragment {
FragmentManager
manager
=
getFragmentManager
();
FragmentTransaction
transaction
=
manager
.
beginTransaction
();
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
complaintFragment
,
complaintFragment
.
getTag
());
transaction
.
addToBackStack
(
complaintFragment
.
getTag
());
manager
.
popBackStackImmediate
(
"ComplaintFragment"
,
FragmentManager
.
POP_BACK_STACK_INCLUSIVE
);
transaction
.
commit
();
}
...
...
app/src/main/res/values/strings.xml
View file @
e64a590e
...
...
@@ -48,4 +48,5 @@
<string
name=
"getting_current_location"
>
Getting current location. Please try after some time
</string>
<string
name=
"GPS_not_enables"
>
GPS is not enabled!
</string>
<string
name=
"no_permission"
>
No permission!
</string>
<string
name=
"hello_blank_fragment"
>
Hello blank fragment
</string>
</resources>
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