|
|
@@ -7,6 +7,7 @@ import android.support.annotation.Nullable;
|
|
|
import android.support.v4.app.Fragment;
|
|
|
import android.support.v4.app.FragmentTransaction;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.view.KeyEvent;
|
|
|
import android.view.MotionEvent;
|
|
|
import android.view.View;
|
|
|
import android.widget.FrameLayout;
|
|
|
@@ -21,6 +22,7 @@ import com.sheep.gamegroup.event.BigEvent;
|
|
|
import com.sheep.gamegroup.greendao.download.DownLoadInfo;
|
|
|
import com.sheep.gamegroup.helper.DownloadHelper;
|
|
|
import com.sheep.gamegroup.model.entity.Container;
|
|
|
+import com.sheep.gamegroup.model.entity.Lp;
|
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.model.util.ShowRedDot;
|
|
|
import com.sheep.gamegroup.util.ActionUtil;
|
|
|
@@ -28,13 +30,16 @@ import com.sheep.gamegroup.util.ChannelContent;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
import com.sheep.gamegroup.util.DataUtil;
|
|
|
import com.sheep.gamegroup.util.DownloadUtil;
|
|
|
+import com.sheep.gamegroup.util.DrawablesHelper;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
+import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.MainTab;
|
|
|
import com.sheep.gamegroup.util.SysAppUtil;
|
|
|
import com.sheep.gamegroup.util.TestUtil;
|
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
+import com.sheep.gamegroup.util.viewHelper.LayoutParamsUtil;
|
|
|
import com.sheep.gamegroup.view.dialog.DialogGameOrTaskOrGift;
|
|
|
import com.sheep.gamegroup.view.fragment.FgtPersonalCenter;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
@@ -207,7 +212,11 @@ public class ActMain extends BaseActYmPermissionCheck {
|
|
|
View view = tab_container.getChildAt(index);
|
|
|
if (view instanceof TextView) {
|
|
|
((TextView) view).setText(mainTab.getStringId());
|
|
|
-// new DrawablesHelper((TextView) view).direction(DrawablesHelper.TOP).drawable(mainTab.getDrawableId()).commit();
|
|
|
+ if(mainTab.getDrawableId() == R.drawable.drawable_selector_askgetmoney) {
|
|
|
+// 166x137 204x170
|
|
|
+ new DrawablesHelper((TextView) view).direction(DrawablesHelper.TOP).drawable(mainTab.getDrawableId(), 150 / 170.0f).commit();
|
|
|
+// testView = view;
|
|
|
+ }
|
|
|
}
|
|
|
tabs.add(view);
|
|
|
final int position = index;
|
|
|
@@ -224,6 +233,27 @@ public class ActMain extends BaseActYmPermissionCheck {
|
|
|
transaction.commitAllowingStateLoss();
|
|
|
tabs.get(lastPosition).setActivated(true);
|
|
|
}
|
|
|
+// private View testView;
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public boolean onKeyDown(int keyCode, KeyEvent event) {
|
|
|
+// switch (event.getKeyCode()){
|
|
|
+// case KeyEvent.KEYCODE_8:
|
|
|
+// addTestViewH(1);
|
|
|
+// break;
|
|
|
+// case KeyEvent.KEYCODE_2:
|
|
|
+// addTestViewH(-1);
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// return super.onKeyDown(keyCode, event);
|
|
|
+// }
|
|
|
+//
|
|
|
+// private int defaultTestViewH = 65;
|
|
|
+// private void addTestViewH(int add) {
|
|
|
+// defaultTestViewH += add;
|
|
|
+// LayoutParamsUtil.resetLayoutParams(testView, new Lp(G.DENSITY).setHeight(defaultTestViewH).setWidth((int) (defaultTestViewH * 204 / 170.0f)));
|
|
|
+// LogUtil.println("addTestViewH add =", defaultTestViewH);
|
|
|
+// }
|
|
|
|
|
|
private void switchFragment(int position) {
|
|
|
View lastTab = ListUtil.getItem(tabs, lastPosition);
|