Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
7ebc0813
Commit
7ebc0813
authored
May 22, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FB登录跳转SMS登录
parent
797164da
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
0 deletions
+67
-0
src/main/java/com/common/base/BaseApplication.java
+9
-0
src/main/java/com/common/widget/FloatView.java
+55
-0
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
+1
-0
src/main/res/values/strings.xml
+2
-0
No files found.
src/main/java/com/common/base/BaseApplication.java
View file @
7ebc0813
package
com
.
common
.
base
;
package
com
.
common
.
base
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.res.Configuration
;
import
android.content.res.Configuration
;
import
android.os.Bundle
;
import
android.support.multidex.MultiDexApplication
;
import
android.support.multidex.MultiDexApplication
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.FrameLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
tech.starwin.LibConfig
;
import
tech.starwin.LibConfig
;
import
tech.starwin.network.Gateway
;
import
tech.starwin.utils.InstallReferrerHelper
;
import
tech.starwin.utils.InstallReferrerHelper
;
import
tech.starwin.utils.context_utils.AppLanguageUtils
;
import
tech.starwin.utils.context_utils.AppLanguageUtils
;
...
...
src/main/java/com/common/widget/FloatView.java
0 → 100644
View file @
7ebc0813
package
com
.
common
.
widget
;
import
android.content.Context
;
import
android.support.annotation.LayoutRes
;
import
android.util.DisplayMetrics
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.WindowManager
;
/**
* Created by SiKang on 2019/5/21.
*/
public
class
FloatView
{
private
View
rootView
;
private
Context
context
;
public
FloatView
(
Context
context
)
{
this
.
context
=
context
;
}
public
void
bindLayout
(
@LayoutRes
int
layout
,
float
x
,
float
y
,
OnLayoutListener
onLayoutListener
)
{
rootView
=
LayoutInflater
.
from
(
context
).
inflate
(
layout
,
null
);
onLayoutListener
.
onLayout
(
rootView
);
WindowManager
manager
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
manager
.
addView
(
rootView
,
rootView
.
getLayoutParams
());
setLocatioin
(
x
,
y
);
}
public
void
bindLayout
(
View
view
,
float
x
,
float
y
)
{
rootView
=
view
;
WindowManager
manager
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
WindowManager
.
LayoutParams
layoutParams
=
new
WindowManager
.
LayoutParams
();
layoutParams
.
width
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
;
layoutParams
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
;
manager
.
addView
(
rootView
,
layoutParams
);
setLocatioin
(
x
,
y
);
}
private
void
setLocatioin
(
float
x
,
float
y
)
{
WindowManager
manager
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
WindowManager
.
LayoutParams
layoutParams
=
(
WindowManager
.
LayoutParams
)
rootView
.
getLayoutParams
();
DisplayMetrics
dm
=
new
DisplayMetrics
();
manager
.
getDefaultDisplay
().
getMetrics
(
dm
);
layoutParams
.
x
=
(
int
)
(
dm
.
widthPixels
*
x
);
layoutParams
.
y
=
(
int
)
(
dm
.
heightPixels
*
y
);
rootView
.
setLayoutParams
(
layoutParams
);
}
public
interface
OnLayoutListener
{
void
onLayout
(
View
view
);
}
}
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
View file @
7ebc0813
...
@@ -85,6 +85,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -85,6 +85,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
public
void
accept
(
GatewayInfoBean
gatewayInfoBean
)
throws
Exception
{
public
void
accept
(
GatewayInfoBean
gatewayInfoBean
)
throws
Exception
{
Gateway
.
setGatewayInfoBean
(
gatewayInfoBean
);
Gateway
.
setGatewayInfoBean
(
gatewayInfoBean
);
getCustomerMsg
(
""
);
getCustomerMsg
(
""
);
view
.
onHttpSuccess
(
""
,
null
);
EventBus
.
getDefault
().
post
(
ActionEnum
.
GATEWAY_UPDATED
);
EventBus
.
getDefault
().
post
(
ActionEnum
.
GATEWAY_UPDATED
);
}
}
});
});
...
...
src/main/res/values/strings.xml
View file @
7ebc0813
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
<string
name=
"text_completed"
>
Lengkap
</string>
<string
name=
"text_completed"
>
Lengkap
</string>
<string
name=
"text_certification2"
>
Bukti
</string>
<string
name=
"text_certification2"
>
Bukti
</string>
<string
name=
"text_me"
>
Saya
</string>
<string
name=
"text_me"
>
Saya
</string>
<string
name=
"text_can_not_login"
>
Tidak bisa masuk?
</string>
<string
name=
"loan_duration"
>
Durasi Pinjaman
</string>
<string
name=
"loan_duration"
>
Durasi Pinjaman
</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