Commit 9c45bc8b by 霍志良

Merge remote-tracking branch 'origin/4.3.10' into 适配64位CPU

# Conflicts:
#	app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
#	config.gradle
parents 8d41c7f1 577fd9d1
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -99,8 +99,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -99,8 +99,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
} }
private fun initAdapter() { private fun initAdapter() {
mPresenter?.localHomeData(mContext!!, "home_data_xlzx.json") mPresenter?.localHomeData(mContext, "home_data_xlzx.json")
adapter = YdlHomeAdapter(mContext!!, homeEvent!!, ArrayList()) adapter = YdlHomeAdapter(mContext, homeEvent!!, ArrayList())
val layoutManager = val layoutManager =
LinearLayoutManager(context) LinearLayoutManager(context)
home_module_fragment_recycler.layoutManager = layoutManager home_module_fragment_recycler.layoutManager = layoutManager
...@@ -116,7 +116,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -116,7 +116,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
home_swipe_refresh_layout.setOnRefreshListener(this) home_swipe_refresh_layout.setOnRefreshListener(this)
home_swipe_refresh_layout.setColorSchemeColors( home_swipe_refresh_layout.setColorSchemeColors(
ContextCompat.getColor( ContextCompat.getColor(
mContext!!, mContext,
R.color.platform_main_theme R.color.platform_main_theme
) )
) )
......
...@@ -101,10 +101,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -101,10 +101,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
tab_layout.addOnTabSelectedListener(listener!!) tab_layout.addOnTabSelectedListener(listener!!)
try { try {
var textView = tab_layout.getTabAt(0) as TextView var textView = tab_layout.getTabAt(0) as TextView
if (textView != null && textView is TextView) {
updateText(textView, true) updateText(textView, true)
}
} catch (e: Exception) {} } catch (e: Exception) {}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
tab_layout.setOnScrollChangeListener { v, scrollX, scrollY, oldScrollX, oldScrollY -> tab_layout.setOnScrollChangeListener { v, scrollX, scrollY, oldScrollX, oldScrollY ->
...@@ -133,12 +130,12 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -133,12 +130,12 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
//创建HomeConsultItemView:每个tab最多显示四个专家 //创建HomeConsultItemView:每个tab最多显示四个专家
if (cacheInfoViewList!!.size >= list.size) { if (cacheInfoViewList!!.size >= list.size) {
for (index in 0 until list!!.size) { for (index in list.indices) {
//设置数据 //设置数据
cacheInfoViewList!![index].setData( cacheInfoViewList!![index].setData(
list[index]!!, list[index],
index, index,
index == list!!.size - 1, index == list.size - 1,
"${category?.id}" "${category?.id}"
) )
cacheInfoViewList!![index].layoutParams = getViewLayoutParams(index) cacheInfoViewList!![index].layoutParams = getViewLayoutParams(index)
...@@ -146,7 +143,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -146,7 +143,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
ll_content.addView(cacheInfoViewList!![index]) ll_content.addView(cacheInfoViewList!![index])
} }
} else { } else {
for (index in 0 until list!!.size) { for (index in list.indices) {
if (index > 3) { if (index > 3) {
//只取前四条数据 //只取前四条数据
break break
...@@ -158,9 +155,9 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -158,9 +155,9 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
} }
//设置数据 //设置数据
cacheInfoViewList!![index].setData( cacheInfoViewList!![index].setData(
list[index]!!, list[index],
index, index,
index == list!!.size - 1, index == list.size - 1,
"${category?.id}" "${category?.id}"
) )
cacheInfoViewList!![index].layoutParams = getViewLayoutParams(index) cacheInfoViewList!![index].layoutParams = getViewLayoutParams(index)
...@@ -205,21 +202,17 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -205,21 +202,17 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
override fun onTabUnselected(tab: TabLayout.Tab?) { override fun onTabUnselected(tab: TabLayout.Tab?) {
var textView = tabLayout?.getTabAt(tab?.position!!)?.customView as TextView var textView = tabLayout?.getTabAt(tab?.position!!)?.customView as TextView
if (textView != null && textView is TextView) {
updateText(textView, false) updateText(textView, false)
} }
}
override fun onTabSelected(tab: TabLayout.Tab?) { override fun onTabSelected(tab: TabLayout.Tab?) {
if (mLastPosition == tab!!.position) { if (mLastPosition == tab!!.position) {
return return
} }
var textView = tabLayout?.getTabAt(tab?.position!!)?.customView as TextView var textView = tabLayout?.getTabAt(tab.position)?.customView as TextView
if (textView != null && textView is TextView) {
updateText(textView, true) updateText(textView, true)
} homeEvent!!.getConsultData(list!![tab.position], tab.position)
homeEvent!!.getConsultData(list!![tab!!.position], tab!!.position)
} }
} }
......
...@@ -38,6 +38,11 @@ import io.reactivex.schedulers.Schedulers ...@@ -38,6 +38,11 @@ import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.user_mine_activity_feed_back.* import kotlinx.android.synthetic.main.user_mine_activity_feed_back.*
import java.io.File import java.io.File
import kotlin.properties.Delegates import kotlin.properties.Delegates
import android.os.Build
/** /**
...@@ -220,10 +225,16 @@ class FeedBackActivity : BaseActivity(), View.OnClickListener { ...@@ -220,10 +225,16 @@ class FeedBackActivity : BaseActivity(), View.OnClickListener {
if (list.isEmpty()) { if (list.isEmpty()) {
return return
} }
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
for (i in list.indices) {
addImag(list[i].androidQToPath)
}
} else {
for (i in list.indices) { for (i in list.indices) {
addImag(list[i].path) addImag(list[i].path)
} }
} }
}
override fun onCancel() { override fun onCancel() {
......
...@@ -149,21 +149,21 @@ ...@@ -149,21 +149,21 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/user_secret_right_btn_bg" android:background="@drawable/user_secret_right_btn_bg"
android:gravity="center" android:gravity="center"
android:text="同意并继续" android:text="同意"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="16dp"/> android:textSize="16dp"/>
<TextView <TextView
android:id="@+id/user_secret_no_agree" android:id="@+id/user_secret_no_agree"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="仍不同意并退出" android:text="拒绝"
android:textColor="#999999" android:textColor="#999999"
android:textSize="16dp"/> android:textSize="16dp" />
</LinearLayout> </LinearLayout>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
android:layout_marginRight="25dp" android:layout_marginRight="25dp"
android:layout_height="44dp" android:layout_height="44dp"
android:gravity="center" android:gravity="center"
android:text="同意并继续" android:text="同意"
android:textSize="16dp" android:textSize="16dp"
android:textColor="#ffffff" android:textColor="#ffffff"
android:background="@drawable/user_secret_right_btn_bg"/> android:background="@drawable/user_secret_right_btn_bg"/>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:text="仍不同意并退出" android:text="拒绝"
android:textSize="13dp" android:textSize="13dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:textColor="#999999" android:textColor="#999999"
......
...@@ -40,8 +40,8 @@ public class YDLAppProtector { ...@@ -40,8 +40,8 @@ public class YDLAppProtector {
//检查应用多开 //检查应用多开
//handleDetect(AppProtectorLib.checkIsRunningInVirtualApk(app.getPackageName(),null),true,getHint(hint_1)); //handleDetect(AppProtectorLib.checkIsRunningInVirtualApk(app.getPackageName(),null),true,getHint(hint_1));
//模拟器检测 //模拟器检测 获取传感器不合规
handleDetect(AppProtectorLib.checkIsRunningInEmulator(app,null),true,getHint(hint_2)); // handleDetect(AppProtectorLib.checkIsRunningInEmulator(app,null),true,getHint(hint_2));
//反调试方案 - 检测app是否为debug版本/检测是否有附加调试进程 //反调试方案 - 检测app是否为debug版本/检测是否有附加调试进程
//handleDetect(AppProtectorLib.checkIsDebug(app),true,getHint(hint_3)); //handleDetect(AppProtectorLib.checkIsDebug(app),true,getHint(hint_3));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment