admin 管理员组文章数量: 887021
2023年12月18日发(作者:dw的border是什么)
主要逻辑代码如下:
Toolbar toolbar = (Toolbar) findViewById(r); setSupportActionBar(toolbar); le(_name); setSupportActionBar(toolbar); invalidateOptionsMenu();}@Overridepublic boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(_main, menu); return true;}@TargetApi(19)private void initWindow() { if (_INT >= N_) {getWindow().addFlags(_TRANSLUCENT_STATUS); getWindow().addFlags(_TRANSLUCENT_NAVIGATION); tintManager = new SystemBarTintManager(this); tusBarTintColor(getResources().getColor(_top_background)); tusBarTintEnabled(true); }}@Overridepublic boolean onOptionsItemSelected(MenuItem item) { int id = mId(); //noinspection SimplifiableIfStatement if (id == _settings) { Intent intent = new Intent(, ); startActivity(intent); //return true; } if (id == _settings_bg) { //tabIcons = {me_Base}; main_learn = (LinearLayout) findViewById(_learn); main_kground(FromPath("#DD2196F3")); //return true;#673AB7 action_wholeday } if (id == _wholeday) { Intent intent = new Intent(, ); startActivity(intent); //return true;#673AB7 action_wholeday } return onsItemSelected(item);}private class MyAdapter extends torFragmentPagerAdapter { private String[] tabNames = {"新闻", "阅读", "热点", "政要"};//, "我", b_5_selector private int[] tabIcons = {b_1_selector, b_2_selector, b_3_selector, b_4_selector, b_5_selector}; private LayoutInflater inflater; public MyAdapter(FragmentManager fragmentManager) { super(fragmentManager); inflater = (getApplicationContext()); } @Override public int getCount() { return ; }
mContext = context; erView = recyclerView; mLayoutInflater = (context); et = photoSet; Resources r = ources(); float leftAndRightMargin = ension(_margin_left_and_right);//14px float imageMargin = ension(_margin_top_and_bottom);//20px viewConfiguration = (context); imageHeight = (int)ension(_big_image_item_height); imageWeight = (int)( - (leftAndRightMargin + imageMargin) * 2) / 3;}public void setPhotoSet(PhotoSet photoSet) { et = photoSet;}@Overridepublic int getItemViewType(int position) { return position == 0 ? 0 : position;}@Overridepublic lder onCreateViewHolder(ViewGroup parent, final int viewType) { View hold = e(_sub_image, parent, false); = parent; ImageViewHolder holder = new ImageViewHolder(hold, imageWeight, imageHeight, viewType); (viewType); ouchListener(this); return holder;}@Overridepublic void onBindViewHolder(lder holder, int position) { if (photoSet == null || tos() == null) { setNetworkImageView(((ImageViewHolder) holder).imageView, ""); } else { setNetworkImageView(((ImageViewHolder) holder).imageView, ebpImageForTextAndImageType(tos().get(position).getTimgurl(), imageWeight)); }}@Overridepublic int getItemCount() { return (photoSet == null || tos() == null) ? 3 : tos().size();}@Overridepublic boolean onTouch(View v, MotionEvent event) { Log.d("HorizontalImage", "child onTouchEvent" + ion()); long pressDuration = tTimeMillis() - pressStartTime; switch (ion()) { case _DOWN: { pressStartTime = tTimeMillis(); pressedX = (); pressedY = (); isIntercept = false; break; } case _MOVE: if (pressDuration <= pTapTimeout() && distance(pressedX, pressedY, (), ()) <= ledTouchSlop()) { } else {
版权声明:本文标题:安卓开发课程设计报告 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/free/1702911741h435677.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论