Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
Max Console
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amir Firdaus bin Samsudin
Max Console
Commits
29b3d51f
Commit
29b3d51f
authored
Apr 23, 2019
by
Amir Firdaus bin Samsudin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// New Layout topap
parent
e8fd5a1e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
3111 additions
and
61 deletions
+3111
-61
build.gradle
app/build.gradle
+1
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+5
-1
DashboardActivity.java
...om/maxmoney/maxcddconsole/Activity/DashboardActivity.java
+29
-2
LoginActivity.java
...va/com/maxmoney/maxcddconsole/Activity/LoginActivity.java
+2
-0
TopapActivity.java
...va/com/maxmoney/maxcddconsole/Activity/TopapActivity.java
+133
-58
TopupLedgerActivity.java
.../maxmoney/maxcddconsole/Activity/TopupLedgerActivity.java
+227
-0
UserSearchActivity.java
...m/maxmoney/maxcddconsole/Activity/UserSearchActivity.java
+286
-0
downloadWebView.java
.../com/maxmoney/maxcddconsole/Activity/downloadWebView.java
+118
-0
TopapActivityV2.java
...om/maxmoney/maxcddconsole/ActivityV2/TopapActivityV2.java
+613
-0
TopUpLedgerAdapter.java
...om/maxmoney/maxcddconsole/Adapter/TopUpLedgerAdapter.java
+124
-0
icon_id_card.png
app/src/main/res/drawable/icon_id_card.png
+0
-0
activity_dashboard.xml
app/src/main/res/layout/activity_dashboard.xml
+11
-0
activity_download_web_view.xml
app/src/main/res/layout/activity_download_web_view.xml
+13
-0
activity_topap_v2.xml
app/src/main/res/layout/activity_topap_v2.xml
+345
-0
activity_topup_ledger.xml
app/src/main/res/layout/activity_topup_ledger.xml
+173
-0
activity_user_search.xml
app/src/main/res/layout/activity_user_search.xml
+744
-0
dialog_custom_layout.xml
app/src/main/res/layout/dialog_custom_layout.xml
+19
-0
dialog_operator_v2.xml
app/src/main/res/layout/dialog_operator_v2.xml
+50
-0
list_adapter_topap_ledger.xml
app/src/main/res/layout/list_adapter_topap_ledger.xml
+218
-0
No files found.
app/build.gradle
View file @
29b3d51f
...
@@ -37,4 +37,5 @@ dependencies {
...
@@ -37,4 +37,5 @@ dependencies {
implementation
'com.android.support:design:28.0.0'
implementation
'com.android.support:design:28.0.0'
implementation
'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation
'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation
'com.jsibbold:zoomage:1.2.0-SNAPSHOT'
implementation
'com.jsibbold:zoomage:1.2.0-SNAPSHOT'
implementation
'com.github.chrisbanes:PhotoView:2.1.3'
}
}
app/src/main/AndroidManifest.xml
View file @
29b3d51f
...
@@ -17,7 +17,11 @@
...
@@ -17,7 +17,11 @@
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/AppThemeNoActionBar"
android:theme=
"@style/AppThemeNoActionBar"
android:usesCleartextTraffic=
"true"
>
android:usesCleartextTraffic=
"true"
>
<activity
android:name=
".Activity.CddActivity"
></activity>
<activity
android:name=
".ActivityV2.TopapActivityV2"
></activity>
<activity
android:name=
".Activity.downloadWebView"
/>
<activity
android:name=
".Activity.TopupLedgerActivity"
/>
<activity
android:name=
".Activity.UserSearchActivity"
/>
<activity
android:name=
".Activity.CddActivity"
/>
<activity
android:name=
".Activity.CddSearchActivity"
/>
<activity
android:name=
".Activity.CddSearchActivity"
/>
<activity
android:name=
".Activity.RegistrationActivity"
/>
<activity
android:name=
".Activity.RegistrationActivity"
/>
<activity
android:name=
".Activity.ApproveCustomerClickActivity"
/>
<activity
android:name=
".Activity.ApproveCustomerClickActivity"
/>
...
...
app/src/main/java/com/maxmoney/maxcddconsole/Activity/DashboardActivity.java
View file @
29b3d51f
...
@@ -17,6 +17,7 @@ import com.android.volley.RequestQueue;
...
@@ -17,6 +17,7 @@ import com.android.volley.RequestQueue;
import
com.android.volley.VolleyError
;
import
com.android.volley.VolleyError
;
import
com.android.volley.toolbox.StringRequest
;
import
com.android.volley.toolbox.StringRequest
;
import
com.android.volley.toolbox.Volley
;
import
com.android.volley.toolbox.Volley
;
import
com.maxmoney.maxcddconsole.ActivityV2.TopapActivityV2
;
import
com.maxmoney.maxcddconsole.Common.StandardProgressDialog
;
import
com.maxmoney.maxcddconsole.Common.StandardProgressDialog
;
import
com.maxmoney.maxcddconsole.Connectivity.BasedUrl
;
import
com.maxmoney.maxcddconsole.Connectivity.BasedUrl
;
import
com.maxmoney.maxcddconsole.R
;
import
com.maxmoney.maxcddconsole.R
;
...
@@ -42,6 +43,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
...
@@ -42,6 +43,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
Button
button_logout
;
Button
button_logout
;
LinearLayout
linear_customer_main
,
linear_topap_main
,
linear_complience
;
LinearLayout
linear_customer_main
,
linear_topap_main
,
linear_complience
;
LinearLayout
linear_customer_all
,
linear_cdd
,
linear_user_all
,
linear_topap
,
linear_approve
,
linear_user_search_c
;
LinearLayout
linear_customer_all
,
linear_cdd
,
linear_user_all
,
linear_topap
,
linear_approve
,
linear_user_search_c
;
TextView
textView_topap_ledger
;
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
...
@@ -54,6 +56,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
...
@@ -54,6 +56,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
textView_title
=
findViewById
(
R
.
id
.
textView_title
);
textView_title
=
findViewById
(
R
.
id
.
textView_title
);
standardProgressDialog
.
show
();
standardProgressDialog
.
show
();
button_logout
=
findViewById
(
R
.
id
.
button_logout
);
button_logout
=
findViewById
(
R
.
id
.
button_logout
);
textView_topap_ledger
=
findViewById
(
R
.
id
.
textView_topap_ledger
);
linear_customer_main
=
findViewById
(
R
.
id
.
linear_customer_main
);
linear_customer_main
=
findViewById
(
R
.
id
.
linear_customer_main
);
linear_topap_main
=
findViewById
(
R
.
id
.
linear_topap_main
);
linear_topap_main
=
findViewById
(
R
.
id
.
linear_topap_main
);
...
@@ -67,12 +70,14 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
...
@@ -67,12 +70,14 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
linear_approve
=
findViewById
(
R
.
id
.
linear_approve
);
linear_approve
=
findViewById
(
R
.
id
.
linear_approve
);
linear_user_search_c
=
findViewById
(
R
.
id
.
linear_user_search_c
);
linear_user_search_c
=
findViewById
(
R
.
id
.
linear_user_search_c
);
button_logout
.
setOnClickListener
(
this
);
button_logout
.
setOnClickListener
(
this
);
linear_topap
.
setOnClickListener
(
this
);
linear_topap
.
setOnClickListener
(
this
);
linear_approve
.
setOnClickListener
(
this
);
linear_approve
.
setOnClickListener
(
this
);
linear_customer_all
.
setOnClickListener
(
this
);
//REGISTER CUSTOMER
linear_customer_all
.
setOnClickListener
(
this
);
//REGISTER CUSTOMER
linear_cdd
.
setOnClickListener
(
this
);
// CDD SEARCH
linear_cdd
.
setOnClickListener
(
this
);
// CDD SEARCH
linear_user_all
.
setOnClickListener
(
this
);
//USER SEARCH
linear_user_search_c
.
setOnClickListener
(
this
);
//USER SEARCH
textView_topap_ledger
.
setOnClickListener
(
this
);
//TOPAP LEDGER
getUserDetails
();
getUserDetails
();
...
@@ -200,7 +205,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
...
@@ -200,7 +205,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
break
;
break
;
}
}
case
R
.
id
.
linear_topap
:
{
case
R
.
id
.
linear_topap
:
{
Intent
next
=
new
Intent
(
getApplicationContext
(),
TopapActivity
.
class
);
Intent
next
=
new
Intent
(
getApplicationContext
(),
TopapActivity
V2
.
class
);
next
.
putExtra
(
"session"
,
session
);
next
.
putExtra
(
"session"
,
session
);
startActivity
(
next
);
startActivity
(
next
);
break
;
break
;
...
@@ -226,6 +231,28 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
...
@@ -226,6 +231,28 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
startActivity
(
next
);
startActivity
(
next
);
break
;
break
;
}
}
case
R
.
id
.
linear_user_search_c
:
{
Intent
next
=
new
Intent
(
getApplicationContext
(),
UserSearchActivity
.
class
);
next
.
putExtra
(
"session"
,
session
);
startActivity
(
next
);
break
;
}
case
R
.
id
.
linear_user_all
:
{
Intent
next
=
new
Intent
(
getApplicationContext
(),
UserSearchActivity
.
class
);
next
.
putExtra
(
"session"
,
session
);
startActivity
(
next
);
break
;
}
case
R
.
id
.
textView_topap_ledger
:{
Intent
next
=
new
Intent
(
getApplicationContext
(),
TopupLedgerActivity
.
class
);
next
.
putExtra
(
"session"
,
session
);
startActivity
(
next
);
break
;
}
}
}
}
}
...
...
app/src/main/java/com/maxmoney/maxcddconsole/Activity/LoginActivity.java
View file @
29b3d51f
...
@@ -51,6 +51,8 @@ public class LoginActivity extends AppCompatActivity {
...
@@ -51,6 +51,8 @@ public class LoginActivity extends AppCompatActivity {
editText_password
=
findViewById
(
R
.
id
.
editText_password
);
editText_password
=
findViewById
(
R
.
id
.
editText_password
);
button_login
=
findViewById
(
R
.
id
.
button_login
);
button_login
=
findViewById
(
R
.
id
.
button_login
);
editText_email
.
setText
(
"maxcdd@maxmoney.com"
);
editText_password
.
setText
(
"moos"
);
button_login
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
button_login
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
...
app/src/main/java/com/maxmoney/maxcddconsole/Activity/TopapActivity.java
View file @
29b3d51f
This diff is collapsed.
Click to expand it.
app/src/main/java/com/maxmoney/maxcddconsole/Activity/TopupLedgerActivity.java
0 → 100644
View file @
29b3d51f
package
com
.
maxmoney
.
maxcddconsole
.
Activity
;
import
android.app.DownloadManager
;
import
android.content.ActivityNotFoundException
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Environment
;
import
android.os.StrictMode
;
import
android.support.v4.content.FileProvider
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.text.Html
;
import
android.util.Log
;
import
android.view.View
;
import
android.webkit.MimeTypeMap
;
import
android.widget.AbsListView
;
import
android.widget.ListView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.android.volley.AuthFailureError
;
import
com.android.volley.Header
;
import
com.android.volley.RequestQueue
;
import
com.android.volley.VolleyError
;
import
com.android.volley.toolbox.StringRequest
;
import
com.android.volley.toolbox.Volley
;
import
com.maxmoney.maxcddconsole.Adapter.TopUpLedgerAdapter
;
import
com.maxmoney.maxcddconsole.Common.StandardProgressDialog
;
import
com.maxmoney.maxcddconsole.Connectivity.BasedUrl
;
import
com.maxmoney.maxcddconsole.R
;
import
org.json.JSONArray
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
java.io.BufferedInputStream
;
import
java.io.BufferedWriter
;
import
java.io.ByteArrayInputStream
;
import
java.io.DataInputStream
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.io.OutputStream
;
import
java.io.OutputStreamWriter
;
import
java.io.UnsupportedEncodingException
;
import
java.io.Writer
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.net.URLEncoder
;
import
java.sql.Blob
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
android
.
os
.
Environment
.
DIRECTORY_DCIM
;
import
static
com
.
android
.
volley
.
Request
.
Method
.
GET
;
import
static
com
.
android
.
volley
.
Request
.
Method
.
POST
;
public
class
TopupLedgerActivity
extends
AppCompatActivity
implements
AbsListView
.
OnScrollListener
{
ListView
list
;
String
session
;
StandardProgressDialog
standardProgressDialog
;
private
ArrayList
<
Map
<
String
,
String
>>
data
=
null
;
private
TopUpLedgerAdapter
mPLAdapter
;
private
int
currentPagination
=
1
;
private
int
total
=
100
;
TextView
textView_downloadSUmmary
;
DownloadManager
downloadManager
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_topup_ledger
);
StrictMode
.
ThreadPolicy
policy
=
new
StrictMode
.
ThreadPolicy
.
Builder
().
permitAll
().
build
();
StrictMode
.
setThreadPolicy
(
policy
);
session
=
getIntent
().
getStringExtra
(
"session"
);
standardProgressDialog
=
new
StandardProgressDialog
(
this
.
getWindow
().
getContext
());
list
=
findViewById
(
R
.
id
.
listView
);
textView_downloadSUmmary
=
findViewById
(
R
.
id
.
textView_downloadSUmmary
);
standardProgressDialog
.
show
();
getTotalTopap
();
textView_downloadSUmmary
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
standardProgressDialog
.
show
();
downloadFile
();
}
});
}
@Override
public
void
onScroll
(
AbsListView
view
,
int
firstVisibleItem
,
int
visibleItemCount
,
int
totalItemCount
)
{
if
(
totalItemCount
>
0
&&
list
!=
null
)
{
int
lastPosition
=
list
.
getLastVisiblePosition
();
if
(
lastPosition
+
1
==
totalItemCount
&&
data
.
size
()
<
total
)
{
Log
.
d
(
"data"
,
String
.
valueOf
(
data
.
size
()));
Log
.
d
(
"data"
,
String
.
valueOf
(
total
));
currentPagination
++;
getDetailsTopap
();
}
}
}
@Override
public
void
onScrollStateChanged
(
AbsListView
view
,
int
scrollState
)
{
}
private
void
getTotalTopap
()
{
data
=
new
ArrayList
<
Map
<
String
,
String
>>();
// data
mPLAdapter
=
new
TopUpLedgerAdapter
(
getApplicationContext
(),
data
);
list
.
setAdapter
(
mPLAdapter
);
list
.
setOnScrollListener
(
this
);
StringRequest
stringRequest
=
new
StringRequest
(
GET
,
BasedUrl
.
URL_STAGING
+
"topup/my-ledger"
,
new
com
.
android
.
volley
.
Response
.
Listener
<
String
>()
{
@Override
public
void
onResponse
(
String
response
)
{
try
{
JSONObject
obj1
=
new
JSONObject
(
response
);
total
=
Integer
.
parseInt
(
obj1
.
getString
(
"total"
));
Log
.
d
(
"total data omoe"
,
String
.
valueOf
(
total
));
getDetailsTopap
();
standardProgressDialog
.
dismiss
();
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
}
},
new
com
.
android
.
volley
.
Response
.
ErrorListener
()
{
@Override
public
void
onErrorResponse
(
VolleyError
error
)
{
Toast
.
makeText
(
getApplicationContext
(),
"Please check Internet Connection !!"
,
Toast
.
LENGTH_LONG
).
show
();
}
})
{
@Override
public
Map
<
String
,
String
>
getHeaders
()
throws
AuthFailureError
{
HashMap
<
String
,
String
>
headers
=
new
HashMap
();
headers
.
put
(
"api-key"
,
session
);
return
headers
;
}
};
RequestQueue
requestQueue
=
Volley
.
newRequestQueue
(
getApplicationContext
());
requestQueue
.
add
(
stringRequest
);
}
private
void
getDetailsTopap
()
{
StringRequest
stringRequest
=
new
StringRequest
(
GET
,
BasedUrl
.
URL_STAGING
+
"topup/my-ledger?page="
+
currentPagination
,
new
com
.
android
.
volley
.
Response
.
Listener
<
String
>()
{
@Override
public
void
onResponse
(
String
response
)
{
try
{
Log
.
d
(
"response"
,
response
);
JSONObject
obj1
=
new
JSONObject
(
response
);
JSONArray
array
=
obj1
.
getJSONArray
(
"entries"
);
for
(
int
i
=
0
;
i
<
array
.
length
();
i
++){
JSONObject
product
=
array
.
getJSONObject
(
i
);
double
profit
=
0.0
;
if
(
product
.
has
(
"retailPrice"
)){
if
(!
product
.
getString
(
"retailPrice"
).
equals
(
""
)
&&
!
product
.
getString
(
"agentPrice"
).
equals
(
""
)){
profit
=
Double
.
parseDouble
(
product
.
getString
(
"retailPrice"
))
-
Double
.
parseDouble
(
product
.
getString
(
"agentPrice"
));
}
}
Map
<
String
,
String
>
addData
=
new
HashMap
<
String
,
String
>();
addData
.
put
(
"msg1"
,
"MOBILE NO :"
+
product
.
getString
(
"mobileNo"
));
addData
.
put
(
"msg2"
,
product
.
getString
(
"status"
));
addData
.
put
(
"msg3"
,
product
.
getString
(
"country"
));
addData
.
put
(
"msg4"
,
product
.
getString
(
"product"
));
addData
.
put
(
"msg5"
,
product
.
getString
(
"debit"
));
addData
.
put
(
"msg6"
,
"RM "
+
product
.
getString
(
"balance"
));
addData
.
put
(
"msg7"
,
String
.
format
(
"%.3f"
,
profit
));
addData
.
put
(
"msg8"
,
product
.
getString
(
"time"
));
addData
.
put
(
"msg9"
,
product
.
getString
(
"description"
));
data
.
add
(
addData
);
}
mPLAdapter
.
refreshData
(
data
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
}
},
new
com
.
android
.
volley
.
Response
.
ErrorListener
()
{
@Override
public
void
onErrorResponse
(
VolleyError
error
)
{
Toast
.
makeText
(
getApplicationContext
(),
"Please check Internet Connection !!"
,
Toast
.
LENGTH_LONG
).
show
();
}
})
{
@Override
public
Map
<
String
,
String
>
getHeaders
()
throws
AuthFailureError
{
HashMap
<
String
,
String
>
headers
=
new
HashMap
();
headers
.
put
(
"api-key"
,
session
);
return
headers
;
}
};
RequestQueue
requestQueue
=
Volley
.
newRequestQueue
(
getApplicationContext
());
requestQueue
.
add
(
stringRequest
);
}
private
void
downloadFile
(){
downloadManager
=
(
DownloadManager
)
getSystemService
(
Context
.
DOWNLOAD_SERVICE
);
Uri
uri
=
Uri
.
parse
(
"https://www.maxmoney.com/my/app/android/excel.php?api-key="
+
session
);
DownloadManager
.
Request
request
=
new
DownloadManager
.
Request
(
uri
);
request
.
setNotificationVisibility
(
DownloadManager
.
Request
.
VISIBILITY_VISIBLE_NOTIFY_COMPLETED
);
Long
reference
=
downloadManager
.
enqueue
(
request
);
standardProgressDialog
.
dismiss
();
Toast
.
makeText
(
getApplicationContext
(),
"File download"
,
Toast
.
LENGTH_SHORT
).
show
();
}
}
app/src/main/java/com/maxmoney/maxcddconsole/Activity/UserSearchActivity.java
0 → 100644
View file @
29b3d51f
This diff is collapsed.
Click to expand it.
app/src/main/java/com/maxmoney/maxcddconsole/Activity/downloadWebView.java
0 → 100644
View file @
29b3d51f
package
com
.
maxmoney
.
maxcddconsole
.
Activity
;
import
android.app.DownloadManager
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.net.http.SslError
;
import
android.os.Environment
;
import
android.support.v7.app.AlertDialog
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.util.Base64
;
import
android.util.Log
;
import
android.webkit.CookieManager
;
import
android.webkit.DownloadListener
;
import
android.webkit.GeolocationPermissions
;
import
android.webkit.SslErrorHandler
;
import
android.webkit.URLUtil
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebResourceResponse
;
import
android.webkit.WebView
;
import
android.webkit.WebViewClient
;
import
android.widget.Toast
;
import
com.maxmoney.maxcddconsole.R
;
import
java.net.URLEncoder
;
import
okhttp3.OkHttpClient
;
import
okhttp3.Request
;
import
okhttp3.Response
;
public
class
downloadWebView
extends
AppCompatActivity
{
WebView
webView
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_download_web_view
);
webView
=
findViewById
(
R
.
id
.
webView
);
webView
.
getSettings
().
setJavaScriptEnabled
(
true
);
webView
.
getSettings
().
setAppCacheEnabled
(
true
);
webView
.
getSettings
().
setDatabaseEnabled
(
true
);
webView
.
getSettings
().
setDomStorageEnabled
(
true
);
webView
.
getSettings
().
setSupportZoom
(
true
);
webView
.
getSettings
().
setJavaScriptCanOpenWindowsAutomatically
(
true
);
webView
.
getSettings
().
setBuiltInZoomControls
(
true
);
webView
.
getSettings
().
setGeolocationEnabled
(
true
);
webView
.
setWebViewClient
(
new
WebViewClient
(){
@Override
public
void
onReceivedSslError
(
WebView
view
,
final
SslErrorHandler
handler
,
SslError
error
)
{
final
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
getApplicationContext
());
String
message
=
"SSL Certificate error."
;
switch
(
error
.
getPrimaryError
())
{
case
SslError
.
SSL_UNTRUSTED
:
message
=
"The certificate authority is not trusted."
;
break
;
case
SslError
.
SSL_EXPIRED
:
message
=
"The certificate has expired."
;
break
;
case
SslError
.
SSL_IDMISMATCH
:
message
=
"The certificate Hostname mismatch."
;
break
;
case
SslError
.
SSL_NOTYETVALID
:
message
=
"The certificate is not yet valid."
;
break
;
}
message
+=
" Do you want to continue anyway?"
;
builder
.
setTitle
(
"SSL Certificate Error"
);
builder
.
setMessage
(
message
);
builder
.
setPositiveButton
(
"continue"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
handler
.
proceed
();
}
});
builder
.
setNegativeButton
(
"cancel"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
handler
.
cancel
();
}
});
final
AlertDialog
dialog
=
builder
.
create
();
dialog
.
show
();
}
@Override
public
boolean
shouldOverrideUrlLoading
(
WebView
view
,
String
url
)
{
// Here put your code for redirect
Log
.
d
(
"url"
,
url
);
// return true; //Indicates WebView to NOT load the url;
return
false
;
//Allow WebView to load url
}
});
webView
.
setWebChromeClient
(
new
WebChromeClient
(){
@Override
public
void
onGeolocationPermissionsShowPrompt
(
String
origin
,
GeolocationPermissions
.
Callback
callback
)
{
callback
.
invoke
(
origin
,
true
,
false
);
}
});
String
postData
=
""
;
webView
.
postUrl
(
"https://api-staging.maxmoney.com/v1/topup/my-reports?accountName=&mode=Summary&api-key="
,
postData
.
getBytes
());
}
}
app/src/main/java/com/maxmoney/maxcddconsole/ActivityV2/TopapActivityV2.java
0 → 100644
View file @
29b3d51f
This diff is collapsed.
Click to expand it.
app/src/main/java/com/maxmoney/maxcddconsole/Adapter/TopUpLedgerAdapter.java
0 → 100755
View file @
29b3d51f
package
com
.
maxmoney
.
maxcddconsole
.
Adapter
;
import
android.content.Context
;
import
android.graphics.Color
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.BaseAdapter
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.maxmoney.maxcddconsole.R
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Map
;
public
class
TopUpLedgerAdapter
extends
BaseAdapter
{
private
ArrayList
<
Map
<
String
,
String
>>
data
=
null
;
private
Context
context
=
null
;
private
LayoutInflater
inflater
;
private
class
ViewHolder
{
TextView
tv1
;
TextView
tv2
;
TextView
tv3
;
TextView
tv4
;
TextView
tv5
;
TextView
tv6
;
TextView
tv7
;
TextView
tv8
;
TextView
tv9
;
LinearLayout
linear_status
;
}
public
TopUpLedgerAdapter
(
Context
context
,
ArrayList
<
Map
<
String
,
String
>>
data
)
{
this
.
data
=
data
;
this
.
context
=
context
;
}
@Override
public
int
getCount
()
{
return
(
data
==
null
)
?
0
:
data
.
size
();
}
@Override
public
Object
getItem
(
int
position
)
{
return
(
data
==
null
)
?
null
:
data
.
get
(
position
);
}
@Override
public
long
getItemId
(
int
position
)
{
return
position
;
}
@Override
public
boolean
isEnabled
(
int
position
)
{
return
true
;
}
@Override
public
View
getView
(
final
int
position
,
View
convertView
,
ViewGroup
parent
)
{
View
view
=
convertView
;
final
ViewHolder
holder
;
if
(
view
==
null
)
{
inflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
view
=
inflater
.
inflate
(
R
.
layout
.
list_adapter_topap_ledger
,
null
);
holder
=
new
ViewHolder
();
holder
.
linear_status
=
view
.
findViewById
(
R
.
id
.
linear_status
);
holder
.
tv1
=
view
.
findViewById
(
R
.
id
.
textView_mobile
);
holder
.
tv2
=
view
.
findViewById
(
R
.
id
.
textView_status
);
holder
.
tv3
=
view
.
findViewById
(
R
.
id
.
textView_country
);
holder
.
tv4
=
view
.
findViewById
(
R
.
id
.
textView_product
);
holder
.
tv5
=
view
.
findViewById
(
R
.
id
.
textView_debit
);
holder
.
tv6
=
view
.
findViewById
(
R
.
id
.
textView_balance
);
holder
.
tv7
=
view
.
findViewById
(
R
.
id
.
textView_profit
);
holder
.
tv8
=
view
.
findViewById
(
R
.
id
.
textView_time
);
holder
.
tv9
=
view
.
findViewById
(
R
.
id
.
textView_des
);
view
.
setTag
(
holder
);
}
else
{
holder
=
(
ViewHolder
)
view
.
getTag
();
}
if
(
data
.
get
(
position
).
get
(
"msg2"
).
equals
(
"FAILURE"
)){
holder
.
linear_status
.
setBackgroundColor
(
Color
.
RED
);
}
else
{
holder
.
linear_status
.
setBackgroundColor
(
Color
.
parseColor
(
"#39B449"
));
}
holder
.
tv1
.
setText
(
data
.
get
(
position
).
get
(
"msg1"
));
holder
.
tv2
.
setText
(
data
.
get
(
position
).
get
(
"msg2"
));
holder
.
tv3
.
setText
(
data
.
get
(
position
).
get
(
"msg3"
));
holder
.
tv4
.
setText
(
data
.
get
(
position
).
get
(
"msg4"
));
holder
.
tv5
.
setText
(
data
.
get
(
position
).
get
(
"msg5"
));
holder
.
tv6
.
setText
(
data
.
get
(
position
).
get
(
"msg6"
));
holder
.
tv7
.
setText
(
data
.
get
(
position
).
get
(
"msg7"
));
holder
.
tv8
.
setText
(
data
.
get
(
position
).
get
(
"msg8"
));
holder
.
tv9
.
setText
(
data
.
get
(
position
).
get
(
"msg9"
));
return
view
;
}
public
void
refreshData
(
ArrayList
<
Map
<
String
,
String
>>
newData
)
{
this
.
data
=
newData
;
this
.
notifyDataSetChanged
();
}
public
CharSequence
createDate
(
long
timestamp
)
{
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTimeInMillis
(
timestamp
);
Date
d
=
c
.
getTime
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"dd/MM/yyyy"
);
return
sdf
.
format
(
d
);
}
}
\ No newline at end of file
app/src/main/res/drawable/icon_id_card.png
0 → 100644
View file @
29b3d51f
6.53 KB
app/src/main/res/layout/activity_dashboard.xml
View file @
29b3d51f
...
@@ -106,6 +106,17 @@
...
@@ -106,6 +106,17 @@
android:textColor=
"@android:color/black"
/>
android:textColor=
"@android:color/black"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/textView_topap_ledger"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"View My TopUp Ledger"
android:textColor=
"@color/colorBackground"
android:textStyle=
"bold|italic"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
...
...
app/src/main/res/layout/activity_download_web_view.xml
0 → 100644
View file @
29b3d51f
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".Activity.downloadWebView"
>
<WebView
android:id=
"@+id/webView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_topap_v2.xml
0 → 100644
View file @
29b3d51f
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/activity_topup_ledger.xml
0 → 100644
View file @
29b3d51f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@android:color/white"
android:orientation=
"vertical"
tools:context=
".Activity.TopupLedgerActivity"
>
<LinearLayout
android:id=
"@+id/linear_header"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:background=
"@color/colorBackground"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/imageView_back"
android:layout_width=
"35dp"
android:layout_height=
"30dp"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:layout_marginLeft=
"8dp"
app:srcCompat=
"@drawable/icon_back"
tools:ignore=
"VectorDrawableCompat"
/>
<TextView
android:id=
"@+id/textView_Register"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginRight=
"40dp"
android:gravity=
"center"
android:text=
"MY TOPUP LEDGER"
android:textColor=
"@android:color/white"
android:textSize=
"18sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"30dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView22"
android:layout_width=
"100dp"
android:layout_height=
"match_parent"
android:layout_marginRight=
"10dp"
android:gravity=
"center"
android:text=
"From (dd-mm-yyyy)"
/>
<EditText
android:id=
"@+id/editText"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:background=
"@drawable/custom_edit_text_register_activity"
android:ems=
"10"
android:inputType=
"textPersonName"
android:paddingLeft=
"10dp"
android:textSize=
"12sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView22"
android:layout_width=
"100dp"
android:layout_height=
"match_parent"
android:layout_marginRight=
"10dp"
android:gravity=
"center"
android:text=
"To (dd-mm-yyyy)"
/>
<EditText
android:id=
"@+id/editText"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:background=
"@drawable/custom_edit_text_register_activity"
android:ems=
"10"
android:inputType=
"textPersonName"
android:paddingLeft=
"10dp"
android:textSize=
"12sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:orientation=
"horizontal"
>
<Button
android:id=
"@+id/button"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@android:color/holo_red_light"
android:text=
"SEARCH"
android:textColor=
"@android:color/white"
/>
<Button
android:id=
"@+id/button"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@color/colorBackground"
android:text=
"RESET"
android:textColor=
"@android:color/white"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"10dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView_downloadSUmmary"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"Download summary report"
android:textColor=
"@color/colorBackground"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/textView23"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"Download detailed report"
android:textColor=
"@color/colorBackground"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
<ListView
android:id=
"@+id/listView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
>
</ListView>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_user_search.xml
0 → 100644
View file @
29b3d51f
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/dialog_custom_layout.xml
0 → 100755
View file @
29b3d51f
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:minWidth=
"300dp"
android:minHeight=
"350dp"
android:orientation=
"vertical"
>
<com.github.chrisbanes.photoview.PhotoView
android:id=
"@+id/imageView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/dialog_operator_v2.xml
0 → 100755
View file @
29b3d51f
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:background=
"@drawable/custom_operator_dialog"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:minWidth=
"300dp"
android:minHeight=
"200dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"15dp"
android:gravity=
"right"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/imageView_cancel"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
app:srcCompat=
"@drawable/icon_cancel"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"40dp"
android:gravity=
"right"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/textView6"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"5dp"
android:text=
"Please choose operator :"
android:textColor=
"@android:color/white"
/>
<Spinner
android:id=
"@+id/spinner_operator"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:background=
"@drawable/custom_spinner_topap_activity"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/list_adapter_topap_ledger.xml
0 → 100755
View file @
29b3d51f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/linear_status"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/colorButtonHijau"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView_mobile"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_weight=
"1"
android:text=
"MOBILE NO : 60136081985"
android:textColor=
"@android:color/white"
/>
<TextView
android:id=
"@+id/textView_status"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"5dp"
android:layout_weight=
"2"
android:gravity=
"right"
android:text=
"SUCCESS"
android:textColor=
"@android:color/white"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView35"
android:layout_width=
"75dp"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:text=
"Country"
android:textColor=
"@android:color/black"
/>
<TextView
android:id=
"@+id/textView_country"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView35"
android:layout_width=
"75dp"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:text=
"Product"
android:textColor=
"@android:color/black"
/>
<TextView
android:id=
"@+id/textView_product"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView35"
android:layout_width=
"75dp"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:text=
"Debit"
android:textColor=
"@android:color/black"
/>
<TextView
android:id=
"@+id/textView_debit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView35"
android:layout_width=
"75dp"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:text=
"Profit Share"
android:textColor=
"@android:color/black"
/>
<TextView
android:id=
"@+id/textView_profit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView35"
android:layout_width=
"75dp"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:text=
"Time"
android:textColor=
"@android:color/black"
/>
<TextView
android:id=
"@+id/textView_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView35"
android:layout_width=
"75dp"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:text=
"Balance"
android:textColor=
"@android:color/black"
/>
<TextView
android:id=
"@+id/textView_balance"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/textView35"
android:layout_width=
"75dp"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:text=
"Description"
android:textColor=
"@android:color/black"
/>
<TextView
android:id=
"@+id/textView_des"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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