| Line 62... |
Line 62... |
| 62 |
retry.setOnClickListener(new View.OnClickListener() {
|
62 |
retry.setOnClickListener(new View.OnClickListener() {
|
| 63 |
@Override
|
63 |
@Override
|
| 64 |
public void onClick(View v) {
|
64 |
public void onClick(View v) {
|
| 65 |
if(isInternetOn()){
|
65 |
if(isInternetOn()){
|
| 66 |
try {
|
66 |
try {
|
| 67 |
if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("10")) {
|
67 |
/* if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("10")) {
|
| 68 |
MyProfile myProfile = new MyProfile();
|
68 |
MyProfile myProfile = new MyProfile();
|
| 69 |
getActivity().getFragmentManager().beginTransaction()
|
69 |
getActivity().getFragmentManager().beginTransaction()
|
| 70 |
.replace(R.id.frame_container, myProfile, "Mike")
|
70 |
.replace(R.id.frame_container, myProfile, "Mike")
|
| 71 |
.addToBackStack(null)
|
71 |
.addToBackStack(null)
|
| 72 |
.commit();
|
72 |
.commit();
|
| 73 |
} else if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("1")) {
|
73 |
} else*/ if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("1")) {
|
| 74 |
DealsHomeFragment nextFrag = new DealsHomeFragment();
|
74 |
DealsHomeFragment nextFrag = new DealsHomeFragment();
|
| 75 |
Bundle args = new Bundle();
|
75 |
Bundle args = new Bundle();
|
| 76 |
args.putString("key", finalURL);
|
76 |
args.putString("key", finalURL);
|
| 77 |
nextFrag.setArguments(args);
|
77 |
nextFrag.setArguments(args);
|
| 78 |
getActivity().getFragmentManager().beginTransaction()
|
78 |
getActivity().getFragmentManager().beginTransaction()
|
| Line 86... |
Line 86... |
| 86 |
ordersFragment.setArguments(args);
|
86 |
ordersFragment.setArguments(args);
|
| 87 |
getActivity().getFragmentManager().beginTransaction()
|
87 |
getActivity().getFragmentManager().beginTransaction()
|
| 88 |
.replace(R.id.frame_container, ordersFragment)
|
88 |
.replace(R.id.frame_container, ordersFragment)
|
| 89 |
.addToBackStack(null)
|
89 |
.addToBackStack(null)
|
| 90 |
.commit();
|
90 |
.commit();
|
| 91 |
} */else if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("12")) {
|
91 |
} else if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("12")) {
|
| 92 |
PreferencesFragment preferencesFragment = new PreferencesFragment();
|
92 |
PreferencesFragment preferencesFragment = new PreferencesFragment();
|
| 93 |
Bundle args = new Bundle();
|
93 |
Bundle args = new Bundle();
|
| 94 |
args.putString("key", finalURL);
|
94 |
args.putString("key", finalURL);
|
| 95 |
preferencesFragment.setArguments(args);
|
95 |
preferencesFragment.setArguments(args);
|
| 96 |
getActivity().getFragmentManager().beginTransaction()
|
96 |
getActivity().getFragmentManager().beginTransaction()
|
| Line 106... |
Line 106... |
| 106 |
.replace(R.id.frame_container, pendingCashback)
|
106 |
.replace(R.id.frame_container, pendingCashback)
|
| 107 |
.addToBackStack(null)
|
107 |
.addToBackStack(null)
|
| 108 |
.commit();
|
108 |
.commit();
|
| 109 |
}else if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("17")) {
|
109 |
}else if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("17")) {
|
| 110 |
MyWallet myWallet = new MyWallet();
|
110 |
MyWallet myWallet = new MyWallet();
|
| 111 |
/* Bundle args = new Bundle();
|
111 |
Bundle args = new Bundle();
|
| 112 |
args.putString("key", finalURL);
|
112 |
args.putString("key", finalURL);
|
| 113 |
myWallet.setArguments(args);*/
|
113 |
myWallet.setArguments(args);
|
| 114 |
getActivity().getFragmentManager().beginTransaction()
|
114 |
getActivity().getFragmentManager().beginTransaction()
|
| 115 |
.replace(R.id.frame_container, myWallet)
|
115 |
.replace(R.id.frame_container, myWallet)
|
| 116 |
.addToBackStack(null)
|
116 |
.addToBackStack(null)
|
| 117 |
.commit();
|
117 |
.commit();
|
| 118 |
}
|
118 |
}
|
| 119 |
else if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("16")) {
|
119 |
else if ((!TextUtils.isEmpty(finalURL) || finalURL != null) && fragmentNumber.equalsIgnoreCase("16")) {
|
| 120 |
AboutUsFragment aboutUs = new AboutUsFragment();
|
120 |
;
|
| 121 |
/* Bundle args = new Bundle();
|
121 |
/* Bundle args = new Bundle();
|
| 122 |
args.putString("key", finalURL);
|
122 |
args.putString("key", finalURL);
|
| 123 |
myWallet.setArguments(args);*/
|
123 |
myWallet.setArguments(args);
|
| 124 |
getActivity().getFragmentManager().beginTransaction()
|
124 |
getActivity().getFragmentManager().beginTransaction()
|
| 125 |
.replace(R.id.frame_container, aboutUs)
|
125 |
.replace(R.id.frame_container, aboutUs)
|
| 126 |
.addToBackStack(null)
|
126 |
.addToBackStack(null)
|
| 127 |
.commit();
|
127 |
.commit();
|
| 128 |
}
|
128 |
}*/
|
| 129 |
else {
|
129 |
else {
|
| 130 |
|
130 |
|
| 131 |
}
|
131 |
}
|
| 132 |
}catch (Exception e){
|
132 |
}catch (Exception e){
|
| 133 |
DealsHomeFragment nextFrag = new DealsHomeFragment();
|
133 |
DealsHomeFragment nextFrag = new DealsHomeFragment();
|
| Line 151... |
Line 151... |
| 151 |
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
151 |
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
| 152 |
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
152 |
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
| 153 |
WebView webView = (WebView) v;
|
153 |
WebView webView = (WebView) v;
|
| 154 |
switch (keyCode) {
|
154 |
switch (keyCode) {
|
| 155 |
case KeyEvent.KEYCODE_BACK:
|
155 |
case KeyEvent.KEYCODE_BACK:
|
| 156 |
Intent i = new Intent(getActivity(), MainActivity.class);
|
156 |
Intent i = new Intent(getActivity(), MainActivity.class);
|
| 157 |
i.putExtra("displayView", "0");
|
157 |
i.putExtra("displayView", "0");
|
| 158 |
startActivity(i);
|
158 |
startActivity(i);
|
| 159 |
return true;
|
159 |
return true;
|
| 160 |
}
|
160 |
}
|
| 161 |
}
|
161 |
}
|
| 162 |
|
162 |
|
| 163 |
return false;
|
163 |
return false;
|
| 164 |
}
|
164 |
}
|
| 165 |
});
|
165 |
});
|