Commit 495d7baf authored by jyx's avatar jyx

大转盘底部位置改变,Tab凸起

parent 45b49f61
......@@ -176,6 +176,15 @@ public class FriendHallMsgBean implements Serializable {
private String name;
private String createTime;
private String head = null;
private String unit;
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getCreateTime() {
return createTime;
......
......@@ -39,6 +39,11 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
initListener()
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
ttNativeExpressManager.initTTAd(false)
}
override fun onResume() {
super.onResume()
......@@ -89,12 +94,13 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
}
}
/**
* 初始化信息iyc
*/
private fun initExpress() {
try {
ttNativeExpressManager.initTTAd(false)
// ttNativeExpressManager.initTTAd(false)
ttNativeExpressManager.getNativeExpressInit(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT, flWalkAd, 320f, 0f)
} catch (e: Exception) {
e.printStackTrace()
......
......@@ -104,8 +104,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
when (view.id) {
R.id.tab_rl_main -> clickTab1Layout()
R.id.tab_rl_channel -> clickTab2Layout()
R.id.tab_rl_friends -> clickTab3Layout()
R.id.tab_rl_pan -> clickTab4Layout()
R.id.tab_rl_friends -> clickTab4Layout()
R.id.tab_rl_pan -> clickTab3Layout()
R.id.tab_rl_my -> clickTab5Layout()
}
}
......@@ -124,8 +124,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_tv_main.isSelected = true
tab_iv_channel.isSelected = false
tab_tv_channel.isSelected = false
tab_iv_pan.isSelected = false
tab_tv_pan.isSelected = false
// tab_iv_pan.isSelected = false
// tab_tv_pan.isSelected = false
tab_iv_friends.isSelected = false
tab_tv_friends.isSelected = false
tab_iv_my.isSelected = false
......@@ -141,7 +141,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
/**
* 点击第二个tab
*/
fun clickTab2Layout() {
private fun clickTab2Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_CHANNEL
if (channelFragment == null) {
channelFragment = HorizChannelFragment()
......@@ -151,18 +151,19 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_tv_main.isSelected = false
tab_iv_channel.isSelected = true
tab_tv_channel.isSelected = true
tab_iv_pan.isSelected = false
tab_tv_pan.isSelected = false
// tab_iv_pan.isSelected = false
// tab_tv_pan.isSelected = false
tab_iv_friends.isSelected = false
tab_tv_friends.isSelected = false
tab_iv_my.isSelected = false
tab_tv_my.isSelected = false
}
/**
* 点击第个tab
* 点击第个tab
*/
fun clickTab3Layout() {
private fun clickTab4Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FRIENDS
if (friendsFragment == null) {
friendsFragment = FriendsFragment()
......@@ -172,8 +173,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_tv_main.isSelected = false
tab_iv_channel.isSelected = false
tab_tv_channel.isSelected = false
tab_iv_pan.isSelected = false
tab_tv_pan.isSelected = false
// tab_iv_pan.isSelected = false
// tab_tv_pan.isSelected = false
tab_iv_friends.isSelected = true
tab_tv_friends.isSelected = true
tab_iv_my.isSelected = false
......@@ -181,9 +182,9 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
}
/**
* 点击第个tab
* 点击第个tab
*/
private fun clickTab4Layout() {
private fun clickTab3Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_PAN
if (panFragment == null) {
panFragment = PanFragment()
......@@ -193,8 +194,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_tv_main.isSelected = false
tab_iv_channel.isSelected = false
tab_tv_channel.isSelected = false
tab_iv_pan.isSelected = true
tab_tv_pan.isSelected = true
// tab_iv_pan.isSelected = true
// tab_tv_pan.isSelected = true
tab_iv_friends.isSelected = false
tab_tv_friends.isSelected = false
tab_iv_my.isSelected = false
......@@ -214,8 +215,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_tv_main.isSelected = false
tab_iv_channel.isSelected = false
tab_tv_channel.isSelected = false
tab_iv_pan.isSelected = false
tab_tv_pan.isSelected = false
// tab_iv_pan.isSelected = false
// tab_tv_pan.isSelected = false
tab_iv_friends.isSelected = false
tab_tv_friends.isSelected = false
tab_iv_my.isSelected = true
......
......@@ -83,6 +83,7 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendHallMsgBea
holder.tvName.text = data.name
holder.tvCoin.text = "" + data.contribution
holder.tvStr.text = "" + data.unit
holder.itemView.setOnClickListener {
mOnItemClickListener?.onItemClick(holder.itemView, position)
......@@ -97,6 +98,7 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendHallMsgBea
val ivRanking: ImageView = itemView.findViewById(R.id.item_invite_iv_ranking)
val tvName: TextView = itemView.findViewById(R.id.item_invited_tv_name)
val tvCoin: TextView = itemView.findViewById(R.id.item_invited_tv_coin)
val tvStr: TextView = itemView.findViewById(R.id.item_invited_tv_str)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
......
......@@ -45,14 +45,14 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
private fun initView() {
val tabs: MutableList<String> = ArrayList()
tabs.add("视频")
tabs.add("游戏")
tabs.add("书城")
tabs.add("游戏")
val fragments: MutableList<Fragment> = ArrayList()
mainFragment = MainFragment()
fragments.add(mainFragment!!)
fragments.add(DhGameFragment())
fragments.add(ZhangyueFragment())
fragments.add(DhGameFragment())
//去除两侧应阴影
vpFragmentMoney.overScrollMode = ViewPager.OVER_SCROLL_NEVER
......@@ -77,10 +77,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
override fun onTabSelected(tab: XTabLayout.Tab) {
if (tab.position == 1) {
if (tab.position == 2) {
if (!UserManager.getInstance().userIsLogin()) {
readyGo(LoginActivity::class.java)
vpFragmentMoney.currentItem = if (curPosition == 1) 0 else curPosition
vpFragmentMoney.currentItem = if (curPosition == 2) 0 else curPosition
return
}
}
......
......@@ -7,6 +7,7 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.signature.ObjectKey;
/**
* 描述:GlideUtils
......@@ -63,7 +64,11 @@ public class GlideUtils {
//加载Gif
public static void loadImageViewGifUrl(Context mContext, ImageView view, String url) {
RequestOptions options = (new RequestOptions()).diskCacheStrategy(DiskCacheStrategy.RESOURCE).timeout(60000).priority(Priority.HIGH);
RequestOptions options = (new RequestOptions())
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.timeout(60000)
.signature(new ObjectKey(System.currentTimeMillis()))
.priority(Priority.HIGH);
Glide.with(mContext).load(url).apply(options).into(view);
}
}
......@@ -29,8 +29,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="60dp"
android:visibility="gone"
android:src="@mipmap/ic_font_water" />
android:src="@mipmap/ic_font_food" />
<com.mints.goodmoney.ui.widgets.MealView
android:id="@+id/svWalk"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false">
<FrameLayout
android:id="@+id/content_layout"
......@@ -73,30 +74,34 @@
</LinearLayout>
<LinearLayout
android:id="@+id/tab_rl_friends"
android:id="@+id/tab_rl_pan"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
android:layout_height="75dp"
android:layout_gravity="bottom"
android:layout_weight="1.0">
<ImageView
android:id="@+id/tab_iv_friends"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/tab_friends_btn" />
<TextView
android:id="@+id/tab_tv_friends"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bottom_tab_friends"
android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" />
android:layout_width="match_parent"
android:layout_height="70dp"
android:src="@mipmap/tab_pan_btn_big" />
<!-- <ImageView-->
<!-- android:id="@+id/tab_iv_pan"-->
<!-- android:layout_width="25dp"-->
<!-- android:layout_height="25dp"-->
<!-- android:src="@drawable/tab_pan_btn" />-->
<!-- <TextView-->
<!-- android:id="@+id/tab_tv_pan"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="@string/bottom_tab_pan"-->
<!-- android:textColor="@drawable/item_txt_sel"-->
<!-- android:textSize="11sp" />-->
</LinearLayout>
<LinearLayout
android:id="@+id/tab_rl_pan"
android:id="@+id/tab_rl_friends"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0"
......@@ -104,16 +109,16 @@
android:orientation="vertical">
<ImageView
android:id="@+id/tab_iv_pan"
android:id="@+id/tab_iv_friends"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/tab_pan_btn" />
android:src="@drawable/tab_friends_btn" />
<TextView
android:id="@+id/tab_tv_pan"
android:id="@+id/tab_tv_friends"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bottom_tab_pan"
android:text="@string/bottom_tab_friends"
android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" />
</LinearLayout>
......
......@@ -410,8 +410,6 @@
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:paddingStart="10dp"
app:xTabIndicatorColor="#FB560C"
app:xTabIndicatorHeight="3dp"
app:xTabIndicatorWidth="36dp"
......
......@@ -49,7 +49,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="贡献值"
android:textColor="@color/my_color_orange"
android:textSize="14sp" />
......
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