摘要: 1、制作.9 png图片 工具:E:\andriod_eclipse\sdk\tools\draw9patch.bat 备注: (1)上边线左右拉伸 左边线上下拉伸 右边线和下边线控制文字输入区域2、颜色增加透明度 #a000 ... 阅读全文
posted @ 2016-04-07 20:56 云中鹤5786 阅读(85) 评论(0) 推荐(0) 编辑
摘要: public class DensityUtils { /** * dp转px */ public static int dp2px(Context ctx, float dp) { float density = ctx.getResou... 阅读全文
posted @ 2016-03-29 14:40 云中鹤5786 阅读(103) 评论(0) 推荐(0) 编辑
摘要: //只含有list的view View menuview = View.inflate(mActivity, R.layout.news_menu_detail, null); mlvNewsDetail = (ListView) menuview.fi... 阅读全文
posted @ 2016-03-27 21:29 云中鹤5786 阅读(109) 评论(0) 推荐(0) 编辑
摘要: //只含有list的view View menuview = View.inflate(mActivity, R.layout.news_menu_detail, null); mlvNewsDetail = (ListView) menuview.fi... 阅读全文
posted @ 2016-03-27 20:44 云中鹤5786 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 使ViewPager不能左右滑动 @Override public boolean onTouchEvent(MotionEvent arg0) { // TODO Auto-generated method stub return fals... 阅读全文
posted @ 2016-03-26 14:52 云中鹤5786 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1、在xml文件中应用控件 2、在java中 绑定菜单titleindicator = (TabPageIndicator)view.findViewById(R.id.indicator);vPager.setAdapter(new TabDetailAdapte... 阅读全文
posted @ 2016-03-25 21:15 云中鹤5786 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 一、抽取 BaseFragment ** * @类名 BaseFragment * @创建者 ppa * @创建时间 2016-3-21 * @描述 TODO */ public abstract class BaseFragment extends Fragment {... 阅读全文
posted @ 2016-03-24 21:52 云中鹤5786 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 1、listview 点击事件 lvLeftMemu.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView arg0, View arg1, in... 阅读全文
posted @ 2016-03-24 20:05 云中鹤5786 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 1、 2、(1)在LeftMenuFragment中添加 public void SetData(String str){ System.out.println("侧栏接收到的数据是"+str); } (2)在Main2Activity中根据标查找Fragment //... 阅读全文
posted @ 2016-03-24 16:29 云中鹤5786 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1、抽取BasePager /** * @类名 BasePager * @创建者 ppa * @创建时间 2016-3-22 * @描述 TODO */ public class BasePager { public Activity mActivity; public... 阅读全文
posted @ 2016-03-22 16:37 云中鹤5786 阅读(145) 评论(0) 推荐(0) 编辑