Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
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
android
android_goodmoney
Commits
aa29a42b
Commit
aa29a42b
authored
Jan 06, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
91b3cb28
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
65 additions
and
25 deletions
+65
-25
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+3
-0
VideoDBHelper.java
...java/com/mints/goodmoney/call/business/VideoDBHelper.java
+2
-1
DetailActivity.java
.../java/com/mints/goodmoney/call/detail/DetailActivity.java
+1
-1
PreferenceUtil.java
...a/com/mints/goodmoney/call/preference/PreferenceUtil.java
+3
-1
KylVedioActivity.kt
...java/com/mints/goodmoney/ui/activitys/KylVedioActivity.kt
+15
-2
KuYinYuePageFragment.kt
...a/com/mints/goodmoney/ui/fragment/KuYinYuePageFragment.kt
+14
-14
activity_detail.xml
GoodMoney/app/src/main/res/layout/activity_detail.xml
+3
-1
activity_permission.xml
GoodMoney/app/src/main/res/layout/activity_permission.xml
+14
-4
item_rv_kyl_page.xml
GoodMoney/app/src/main/res/layout/item_rv_kyl_page.xml
+2
-1
get_permission.png
GoodMoney/app/src/main/res/mipmap-xhdpi/get_permission.png
+0
-0
no_permission.png
GoodMoney/app/src/main/res/mipmap-xhdpi/no_permission.png
+0
-0
ringtone_close.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ringtone_close.png
+0
-0
ringtone_set.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ringtone_set.png
+0
-0
strings.xml
GoodMoney/app/src/main/res/values/strings.xml
+8
-0
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
aa29a42b
...
...
@@ -227,6 +227,9 @@
android:name=
".ui.activitys.KylVedioActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".call.detail.DetailActivity"
/>
<activity
android:name=
".call.permission.PermissionActivity"
/>
<activity
android:name=
".call.detail.DetailApplyActivity"
/>
<service
android:name=
".service.UpdateService"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/call/business/VideoDBHelper.java
View file @
aa29a42b
...
...
@@ -8,6 +8,7 @@ import android.text.TextUtils;
import
android.util.Log
;
import
com.mints.goodmoney.call.provider.CallProvider
;
import
com.mints.goodmoney.common.Constant
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -19,7 +20,7 @@ import java.util.regex.Pattern;
public
class
VideoDBHelper
{
public
static
final
String
UNKNOWN_NUMBER
=
"unknown"
;
private
static
final
String
AUTHORITY
=
"content://
com.hearing.calltest
.provider"
;
private
static
final
String
AUTHORITY
=
"content://
"
+
Constant
.
MINTS_PKG_NAME
+
"
.provider"
;
private
static
final
Uri
VIDEO_URI
=
Uri
.
parse
(
AUTHORITY
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/call/detail/DetailActivity.java
View file @
aa29a42b
...
...
@@ -94,7 +94,7 @@ public class DetailActivity extends AppCompatActivity {
public
void
setRingtone
(
View
view
)
{
mSetRingtone
=
!
mSetRingtone
;
// ((ImageView) view).setImageResource(mSetRingtone ? R.drawable.ringtone_set : R.drawable
.ringtone_close);
((
ImageView
)
view
).
setImageResource
(
mSetRingtone
?
R
.
mipmap
.
ringtone_set
:
R
.
mipmap
.
ringtone_close
);
}
public
void
setContact
(
View
view
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/call/preference/PreferenceUtil.java
View file @
aa29a42b
...
...
@@ -6,10 +6,12 @@ import android.net.Uri;
import
androidx.annotation.NonNull
;
import
com.mints.goodmoney.common.Constant
;
public
class
PreferenceUtil
{
public
static
final
String
METHOD_CONTAIN_KEY
=
"method_contain_key"
;
public
static
final
String
AUTHORITY
=
"com.hearing.calltest"
;
public
static
final
String
AUTHORITY
=
Constant
.
MINTS_PKG_NAME
;
public
static
final
Uri
URI
=
Uri
.
parse
(
"content://"
+
AUTHORITY
);
public
static
final
String
METHOD_QUERY_VALUE
=
"method_query_value"
;
public
static
final
String
METHOD_EIDIT_VALUE
=
"method_edit"
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylVedioActivity.kt
View file @
aa29a42b
...
...
@@ -10,10 +10,11 @@ import com.downloader.OnDownloadListener
import
com.downloader.PRDownloader
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.vedio.VedioAdingManager
import
com.mints.goodmoney.call.detail.DetailActivity
import
com.mints.goodmoney.call.util.Util
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.VedioAdingBean
import
com.mints.goodmoney.mvp.presenters.GamePresenter
import
com.mints.goodmoney.mvp.presenters.KylVedioPresenter
import
com.mints.goodmoney.mvp.views.KylVedioView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
...
...
@@ -43,6 +44,7 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
private
var
downloadId
:
Int
=
-
1
//vedio下载id
private
var
downloadVedioSucFlag
=
false
// 下载视频成功
private
var
cachePath
=
""
// cache路径
private
var
vedioPath
=
""
// vedio路径
private
var
vedioName
=
""
// 视频名称
...
...
@@ -64,6 +66,11 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
return
}
cachePath
=
cacheDir
.
path
+
"/"
try
{
vedioPath
=
getExternalFilesDir
(
null
)
!!
.
absolutePath
+
"/video/"
}
catch
(
e
:
java
.
lang
.
Exception
)
{
vedioPath
=
filesDir
.
absolutePath
+
"/video/"
}
vedioAdingManager
=
VedioAdingManager
.
getInstance
(
this
)
initListener
()
loadVedio
(
vedioUrl
)
...
...
@@ -210,8 +217,14 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
if
(
downloadVedioSucFlag
)
{
LogUtil
.
d
(
"KylVedioActivity"
,
"name:-->"
+
cachePath
+
vedioName
)
try
{
showToast
(
"设置壁纸成功"
)
//
showToast("设置壁纸成功")
videoWallpaper
.
setToWallPaper
(
this
,
cachePath
+
vedioName
)
// val cacheName = cachePath + vedioName
// val vedioName = vedioPath + vedioName
// Thread(Runnable {
// Util.CopyAssets(this, cacheName, vedioName)
// }).start()
// DetailActivity.startSelf(this, vedioName)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/KuYinYuePageFragment.kt
View file @
aa29a42b
...
...
@@ -76,20 +76,20 @@ class KuYinYuePageFragment(private val targetid: String) : LazyLoadBaseFragment(
}
override
fun
getXfPageMsgSuc
(
data
:
KylVedioBean
)
{
//
if (::kylPageAdapter.isInitialized) {
//
kylData.addAll(data.data)
//
if (curPage == 1) {
//
srl_kyl.finishRefresh(true)
//
kylPageAdapter.notifyDataSetChanged()
//
} else {
//
if (data.data.size < PAGE_SIZE) {
//
srl_kyl.finishLoadMoreWithNoMoreData()
//
} else {
//
srl_kyl.finishLoadMore()
//
}
//
kylPageAdapter.notifyItemChanged(data.data.size)
//
}
//
}
if
(
::
kylPageAdapter
.
isInitialized
)
{
kylData
.
addAll
(
data
.
data
)
if
(
curPage
==
1
)
{
srl_kyl
.
finishRefresh
(
true
)
kylPageAdapter
.
notifyDataSetChanged
()
}
else
{
if
(
data
.
data
.
size
<
PAGE_SIZE
)
{
srl_kyl
.
finishLoadMoreWithNoMoreData
()
}
else
{
srl_kyl
.
finishLoadMore
()
}
kylPageAdapter
.
notifyItemChanged
(
data
.
data
.
size
)
}
}
}
override
fun
getXfPageMsgFail
()
{
...
...
GoodMoney/app/src/main/res/layout/activity_detail.xml
View file @
aa29a42b
...
...
@@ -15,6 +15,7 @@
android:layout_alignParentBottom=
"true"
>
<ImageView
android:visibility=
"gone"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_centerVertical=
"true"
...
...
@@ -29,10 +30,11 @@
android:layout_height=
"45dp"
android:layout_centerInParent=
"true"
android:gravity=
"center"
android:text=
"
show
"
android:text=
"
设置
"
android:onClick=
"setShow"
/>
<ImageView
android:visibility=
"gone"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_centerVertical=
"true"
...
...
GoodMoney/app/src/main/res/layout/activity_permission.xml
View file @
aa29a42b
...
...
@@ -12,6 +12,7 @@
android:layout_marginStart=
"40dp"
android:layout_marginEnd=
"40dp"
android:gravity=
"center"
android:text=
"@string/permission_tip"
android:textColor=
"@color/colorAccent"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
...
...
@@ -28,6 +29,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_weight=
"0.7"
android:text=
"@string/sdcard_permission"
android:textColor=
"@color/white"
android:textSize=
"20sp"
/>
...
...
@@ -36,7 +38,8 @@
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_gravity=
"center"
android:layout_weight=
"0.3"
/>
android:layout_weight=
"0.3"
android:src=
"@mipmap/no_permission"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -51,6 +54,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_weight=
"0.7"
android:text=
"@string/phone_permission"
android:textColor=
"@color/white"
android:textSize=
"20sp"
/>
...
...
@@ -59,7 +63,8 @@
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_gravity=
"center"
android:layout_weight=
"0.3"
/>
android:layout_weight=
"0.3"
android:src=
"@mipmap/no_permission"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -74,6 +79,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_weight=
"0.7"
android:text=
"@string/float_permission"
android:textColor=
"@color/white"
android:textSize=
"20sp"
/>
...
...
@@ -82,7 +88,8 @@
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_gravity=
"center"
android:layout_weight=
"0.3"
/>
android:layout_weight=
"0.3"
android:src=
"@mipmap/no_permission"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -97,6 +104,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_weight=
"0.7"
android:text=
"@string/notification_permission"
android:textColor=
"@color/white"
android:textSize=
"20sp"
/>
...
...
@@ -105,7 +113,8 @@
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_gravity=
"center"
android:layout_weight=
"0.3"
/>
android:layout_weight=
"0.3"
android:src=
"@mipmap/no_permission"
/>
</LinearLayout>
<TextView
...
...
@@ -117,6 +126,7 @@
android:paddingTop=
"10dp"
android:paddingEnd=
"30dp"
android:paddingBottom=
"10dp"
android:text=
"@string/get_permission"
android:textColor=
"@color/white"
android:textSize=
"20sp"
android:onClick=
"getPermission"
/>
...
...
GoodMoney/app/src/main/res/layout/item_rv_kyl_page.xml
View file @
aa29a42b
...
...
@@ -2,11 +2,12 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_margin=
"4dp"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<ImageView
<
com.shehuan.niv.Nice
ImageView
android:id=
"@+id/ivKylPage"
android:layout_width=
"match_parent"
android:layout_height=
"300dp"
...
...
GoodMoney/app/src/main/res/mipmap-xhdpi/get_permission.png
0 → 100644
View file @
aa29a42b
6.73 KB
GoodMoney/app/src/main/res/mipmap-xhdpi/no_permission.png
0 → 100644
View file @
aa29a42b
6.97 KB
GoodMoney/app/src/main/res/mipmap-xhdpi/ringtone_close.png
0 → 100644
View file @
aa29a42b
5.25 KB
GoodMoney/app/src/main/res/mipmap-xhdpi/ringtone_set.png
0 → 100644
View file @
aa29a42b
5.95 KB
GoodMoney/app/src/main/res/values/strings.xml
View file @
aa29a42b
...
...
@@ -26,4 +26,12 @@
<string
name=
"register_name"
>
用户注册协议
</string>
<string
name=
"privacy_name"
>
用户隐私协议
</string>
<string
name=
"permission_tip"
>
为了正常使用来电秀,请允许以下权限。
</string>
<string
name=
"sdcard_permission"
>
读写权限
</string>
<string
name=
"phone_permission"
>
电话权限
</string>
<string
name=
"float_permission"
>
悬浮窗权限
</string>
<string
name=
"notification_permission"
>
通知权限
</string>
<string
name=
"get_permission"
>
获取权限
</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