首页 文章 精选 留言 我的

精选列表

搜索[UI组件],共10000篇文章
优秀的个人博客,低调大师

Go 语言社区系统 bbs-go3.2.2 发布,UI 全新升级

更新内容 Feature:帖子、动态功能合并,动态功能更加完善 Feature:全新的帖子信息流展示样式 Feature:记录帖子最后回复人、最后回复时间 Feature:新增签到排行榜 Feature:帖子详情页支持推荐功能 Enhancement:优化头像的存储和加载方式 More:多处细节和功能优化 发布地址 github:https://github.com/mlogclub/bbs-go/releases/tag/v3.2.2 gitee:https://gitee.com/mlogclub/bbs-go/releases/v3.2.2 功能简介 功能预览 相关链接 github:https://github.com/mlogclub/bbs-go gitee:https://gitee.com/mlogclub/bbs-go 演示站:https://mlog.club 帮助文档:http://docs.bbs-go.com/ 问题反馈:https://mlog.club/topic/create 功能建议收集:https://mlog.club/topic/609

优秀的个人博客,低调大师

Hybris service layer和SAP CRM WebClient UI架构的横向比较

我把Hybris service layer理解成CRM WebUI的API layer.The Hybris ServiceLayer is an API for developing services for SAP Hybris Commerce. It provides a number of common services, while allowing you to extend these or develop your own.The main characteristics of the ServiceLayer are: - 我逐条和CRM WebUI框架比较 (1) It is based on a service-oriented architecture.Jerry: Hybris里的SOA架构和BYD不一样,后者支持不同的deployment unit部署在不同服务器上, cross unit的应用通过message通信。Hybris是一个monolithic应用,所有的extension物理上都运行在一台server,一个session里(不考虑cluster mode) (2) It provides a clean separation of business logic and persistence logic.Jerry: CRM WebUI也满足。 (3) It provides a number of services, each with its well-defined responsibilities. (4) 这个描述太generic,大多数framework的某个layer都应该满足。 (5) It provides a framework to develop your own services and to extend existing ones.Jerry:CRM WebUI的API和Genil layer也支持extensibility (6) It is heavily based on the Spring Framework.Jerry: 这是Hybris的特色和强大之处,抱Spring的大腿 (7) It is based on common patterns, such as interface-oriented design and dependency injection.Jerry: CRM WebUI也满足。 (8) It is the layer where partners should implement their business logic.Jerry: CRM WebUI也满足。 (9) It provides hooks into model life-cycle events for performing custom logic.Jerry: ABAP没有build一说,也不需要在class activate的时候执行post操作。没有这种use case. (10) It provides hooks into system event life-cycle events such as init and update process.Jerry: 同8 (11) It provides a framework for publishing and receiving events.Jerry: CRM WebUI里大量使用到的event subscription和issue就是CL_CRM_BOL_ENTITY_COL的focus_changed event. 上图的client是这四种entity的通称: (1) Page Controllers of an MVC framework(2) Web Service clients(3) Scripts(4) Other services 三种service: (1) Business Services implement business use cases, such as cart handling or back order.(2) Infrastructure Services provide the underlying technical foundation, such as internationalization, import, export, and so on.(3) System services provide functionality required by the ServiceLayer, such as model handling and session handling. 本文来自云栖社区合作伙伴“汪子熙”,了解相关信息可以关注微信公众号"汪子熙"。

优秀的个人博客,低调大师

Android:UI设置-横竖屏转换、输入法键盘相关设置

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 public class MainActivity extends Activity { /** * 配置xml:横竖屏转换 * android:screenOrientation="portrait" //竖屏 * android:configChanges="keyboardHidden|orientation" //复用,避免销毁activity * * 输入法配置: * android:windowSoftInputMode="adjustPan" * android:windowSoftInputMode="adjustResize" */ @Override protected void onCreate(Bundle savedInstanceState) { super .onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.e( "onCreate" , "onCreate" ); } @Override protected void onDestroy() { super .onDestroy(); Log.e( "onDestroy" , "onDestroy" ); } @Override //换屏保存的方法 protected void onSaveInstanceState(Bundle outState) { super .onSaveInstanceState(outState); Log.e( "onSaveInstanceState" , "onSaveInstanceState" ); } @Override //换屏保存的方法 protected void onRestoreInstanceState(Bundle savedInstanceState) { super .onRestoreInstanceState(savedInstanceState); Log.e( "onRestoreInstanceState" , "onRestoreInstanceState" ); } @Override //监测屏幕转换 public void onConfigurationChanged(Configuration newConfig) { super .onConfigurationChanged(newConfig); Log.e( "onConfigurationChanged" , "onConfigurationChanged:" +newConfig.orientation); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true ; } } 其他: 1.如果是popwindow中的输入框,要如下设置才有效 "android:windowSoftInputMode="stateVisible|adjustResize|stateAlwaysHidden" 本文转自 glblong 51CTO博客,原文链接:http://blog.51cto.com/glblong/1217555,如需转载请自行联系原作者

优秀的个人博客,低调大师

Android UI开发第二十篇——仿launcher的左右滑动

在论坛里,经常看到有人问如何实现UC或墨迹天气那样的拖动效果。其实大部分的实现都是参考了Launcher里的Workspace这个类。今天又见问起,特分享一下曾经的用到的部分。先看一下效果图: 第一个视图 滑动过程中 第二个视图 本文转自xyz_lmn51CTO博客,原文链接:http://blog.51cto.com/xyzlmn/817129,如需转载请自行联系原作者

优秀的个人博客,低调大师

Android UI开发第十四篇——可以移动的悬浮框

工作中遇到一些项目需要把窗体显示在最上层,像来电弹窗显示电话号码等信息或拦截短信信息显示给用户,我们想这些数据放在最上层,activity就满足不了我们的需求了,有些开发者使用了循环显示Toast的方式,toast是不能获得焦点的,这种方法是不可取的。这个时候,我们如何处理呢? 原来,整个Android的窗口机制是基于一个叫做 WindowManager,这个接口可以添加view到屏幕,也可以从屏幕删除view。它面向的对象一端是屏幕,另一端就是View,直接忽略我们以前的Activity或者Dialog之类的东东。其实我们的Activity或者Diolog底层的实现也是通过WindowManager,这个 WindowManager是全局的,整个系统就是这个唯一的东东。它是显示View的最底层了。 原来,整个Android的窗口机制是基于一个叫做 WindowManager,这个接口可以添加view到屏幕,也可以从屏幕删除view。它面向的对象一端是屏幕,另一端就是View,直接忽略我们以前的Activity或者Dialog之类的东东。其实我们的Activity或者Diolog底层的实现也是通过WindowManager,这个 WindowManager是全局的,整个系统就是这个唯一的东东。它是显示View的最底层了。 WindowManager主要用来管理窗口的一些状态、属性、view增加、删除、更新、窗口顺序、消息收集和处理等。通过Context.getSystemService(Context.WINDOW_SERVICE)的方式可以获得WindowManager的实例. WindowManager继承自ViewManager,里面涉及到窗口管理的三个重要方法,分别是: * addView(); * updateViewLayout(); * removeView(); 效果图如下: 可以移动的悬浮框实现代码如下: publicclassWindowManageDemoActivityextendsActivity{ privateWindowManagermWindowManager; privateWindowManager.LayoutParamsparam; privateFloatViewmLayout; /**Calledwhentheactivityisfirstcreated.*/ @Override publicvoidonCreate(BundlesavedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); showView(); } privatevoidshowView(){ mLayout=newFloatView(getApplicationContext()); mLayout.setBackgroundResource(R.drawable.faceback_head); //获取WindowManager mWindowManager=(WindowManager)getApplicationContext().getSystemService(Context.WINDOW_SERVICE); //设置LayoutParams(全局变量)相关参数 param=((MyApplication)getApplication()).getMywmParams(); param.type=WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;//系统提示类型,重要 param.format=1; param.flags=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;//不能抢占聚焦点 param.flags=param.flags|WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH; param.flags=param.flags|WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;//排版不受限制 param.alpha=1.0f; param.gravity=Gravity.LEFT|Gravity.TOP;//调整悬浮窗口至左上角 //以屏幕左上角为原点,设置x、y初始值 param.x=0; param.y=0; //设置悬浮窗口长宽数据 param.width=140; param.height=140; //显示myFloatView图像 mWindowManager.addView(mLayout,param); } @Override publicvoidonDestroy(){ super.onDestroy(); //在程序退出(Activity销毁)时销毁悬浮窗口 mWindowManager.removeView(mLayout); } } publicclassFloatViewextendsView{ privatefloatmTouchStartX; privatefloatmTouchStartY; privatefloatx; privatefloaty; privateWindowManagerwm=(WindowManager)getContext().getApplicationContext().getSystemService(Context.WINDOW_SERVICE); privateWindowManager.LayoutParamswmParams=((MyApplication)getContext().getApplicationContext()).getMywmParams(); publicFloatView(Contextcontext){ super(context); //TODOAuto-generatedconstructorstub } @Override publicbooleanonTouchEvent(MotionEventevent){ //获取相对屏幕的坐标,即以屏幕左上角为原点 x=event.getRawX(); y=event.getRawY()-25;//25是系统状态栏的高度 Log.i("currP","currX"+x+"====currY"+y); switch(event.getAction()){ caseMotionEvent.ACTION_DOWN: //获取相对View的坐标,即以此View左上角为原点 mTouchStartX=event.getX(); mTouchStartY=event.getY(); Log.i("startP","startX"+mTouchStartX+"====startY"+mTouchStartY); break; caseMotionEvent.ACTION_MOVE: updateViewPosition(); break; caseMotionEvent.ACTION_UP: updateViewPosition(); mTouchStartX=mTouchStartY=0; break; } returntrue; } privatevoidupdateViewPosition(){ //更新浮动窗口位置参数 wmParams.x=(int)(x-mTouchStartX); wmParams.y=(int)(y-mTouchStartY); wm.updateViewLayout(this,wmParams); } } publicclassMyApplicationextendsApplication{ /** *创建全局变量 *全局变量一般都比较倾向于创建一个单独的数据类文件,并使用static静态变量 * *这里使用了在Application中添加数据的方法实现全局变量 *注意在AndroidManifest.xml中的Application节点添加android:name=".MyApplication"属性 * */ privateWindowManager.LayoutParamswmParams=newWindowManager.LayoutParams(); publicWindowManager.LayoutParamsgetMywmParams(){ returnwmParams; } } 本文转自xyz_lmn51CTO博客,原文链接:http://blog.51cto.com/xyzlmn/817282 ,如需转载请自行联系原作者

优秀的个人博客,低调大师

Android UI开发第六篇——仿QQ的滑动Tab

代码下载地址:http://www.devdiv.com/thread-101454-1-1.html 使用了ActivityGroup。 publicclassMainActivityextendsActivityGroup{ privateRelativeLayoutlayout; privateRelativeLayoutlayout1; privateRelativeLayoutlayout2; privateRelativeLayoutlayout3; privateRelativeLayoutbodylayout; privateImageViewtab1; privateImageViewtab2; privateImageViewtab3; privateImageViewfirst; privateintcurrent=1;//默认选中第一个,可以动态的改变此参数值 publicvoidonCreate(BundlesavedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); initUI(); } privatevoidinitUI(){ layout=(RelativeLayout)findViewById(R.id.root); layout1=(RelativeLayout)findViewById(R.id.layout1); layout2=(RelativeLayout)findViewById(R.id.layout2); layout3=(RelativeLayout)findViewById(R.id.layout3); bodylayout=(RelativeLayout)findViewById(R.id.bodylayout); tab1=(ImageView)findViewById(R.id.tab1); tab1.setOnClickListener(onClickListener); tab2=(ImageView)findViewById(R.id.tab2); tab2.setOnClickListener(onClickListener); tab3=(ImageView)findViewById(R.id.tab3); tab3.setOnClickListener(onClickListener); RelativeLayout.LayoutParamsrl=newRelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT); rl.addRule(RelativeLayout.CENTER_IN_PARENT,RelativeLayout.TRUE); first=newImageView(this); first.setTag("first"); first.setImageResource(R.drawable.topbar_select); //默认选中项 switch(current){ case1: layout1.addView(first,rl); current=R.id.tab1; break; case2: layout2.addView(first,rl); current=R.id.tab2; break; case3: layout3.addView(first,rl); current=R.id.tab3; break; default: break; } Viewview=getLocalActivityManager().startActivity("index", newIntent(MainActivity.this,Tab1.class)) .getDecorView(); bodylayout.addView(view); } privatebooleanisAdd=false;//是否添加过top_select privateintselect_width;//top_select_width privateintselect_height;//top_select_height privateintfirstLeft;//第一次添加后的左边距***** privateintstartLeft;//起始左边距 //添加一个view,移除一个view privatevoidreplace(){ switch(current){ caseR.id.tab1: changeTop(layout1); break; caseR.id.tab2: changeTop(layout2); break; caseR.id.tab3: changeTop(layout3); break; default: break; } } privatevoidchangeTop(RelativeLayoutrelativeLayout){ ImageViewold=(ImageView)relativeLayout.findViewWithTag("first");; select_width=old.getWidth(); select_height=old.getHeight(); RelativeLayout.LayoutParamsrl=newRelativeLayout.LayoutParams(select_width,select_height); rl.leftMargin=old.getLeft()+((RelativeLayout)old.getParent()).getLeft(); rl.topMargin=old.getTop()+((RelativeLayout)old.getParent()).getTop(); //获取起始位置 firstLeft=old.getLeft()+((RelativeLayout)old.getParent()).getLeft(); ImageViewiv=newImageView(this); iv.setTag("move"); iv.setImageResource(R.drawable.topbar_select); layout.addView(iv,rl); relativeLayout.removeView(old); } privateOnClickListeneronClickListener=newOnClickListener(){ publicvoidonClick(Viewv){ if(!isAdd){ replace();//初次使用移除old添加新的top_select为RelativeLayout所使用 isAdd=true; } ImageViewtop_select=(ImageView)layout.findViewWithTag("move"); inttabLeft; intendLeft=0; booleanrun=false; switch(v.getId()){ caseR.id.tab1: if(current!=R.id.tab1){ //中心位置 tabLeft=((RelativeLayout)tab1.getParent()).getLeft()+tab1.getLeft()+tab1.getWidth()/2; //最终位置 endLeft=tabLeft-select_width/2; current=R.id.tab1; run=true; bodylayout.removeAllViews(); Viewview=getLocalActivityManager().startActivity("index", newIntent(MainActivity.this,Tab1.class)) .getDecorView(); bodylayout.addView(view); } break; caseR.id.tab2: if(current!=R.id.tab2){ tabLeft=((RelativeLayout)tab2.getParent()).getLeft()+tab2.getLeft()+tab2.getWidth()/2; endLeft=tabLeft-select_width/2; current=R.id.tab2; run=true; bodylayout.removeAllViews(); Viewview=getLocalActivityManager().startActivity("index", newIntent(MainActivity.this,Tab2.class)) .getDecorView(); bodylayout.addView(view); } break; caseR.id.tab3: if(current!=R.id.tab3){ tabLeft=((RelativeLayout)tab3.getParent()).getLeft()+tab3.getLeft()+tab3.getWidth()/2; endLeft=tabLeft-select_width/2; current=R.id.tab3; run=true; bodylayout.removeAllViews(); Viewview=getLocalActivityManager().startActivity("index", newIntent(MainActivity.this,Tab3.class)) .getDecorView(); bodylayout.addView(view); } break; default: break; } if(run){ TranslateAnimationanimation=newTranslateAnimation(startLeft,endLeft-firstLeft,0,0); startLeft=endLeft-firstLeft;//重新设定起始位置 animation.setDuration(400); animation.setFillAfter(true); top_select.bringToFront(); top_select.startAnimation(animation); } } }; } <?xmlversion="1.0"encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/default_bg" > <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="6.0" > <RelativeLayout android:id="@+id/layout1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:layout_gravity="center_vertical" > <ImageView android:id="@+id/tab1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tab1" android:layout_centerInParent="true" /> </RelativeLayout> <RelativeLayout android:id="@+id/layout2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:layout_gravity="center_vertical" > <ImageView android:id="@+id/tab2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tab2" android:layout_centerInParent="true" /> </RelativeLayout> <RelativeLayout android:id="@+id/layout3" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:layout_gravity="center_vertical" > <ImageView android:id="@+id/tab3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tab3" android:layout_centerInParent="true" /> </RelativeLayout> </LinearLayout> <RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:background="#ffffff" android:gravity="center" android:id="@+id/bodylayout" > </RelativeLayout> </LinearLayout> </RelativeLayout> 本文转自xyz_lmn51CTO博客,原文链接:http://blog.51cto.com/xyzlmn/817371 ,如需转载请自行联系原作者

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码