为什么Mac上的xterm中的emacs将ch解释为reverse-delete-char?(Why does emacs in an xterm on a Mac interpret c-h as backward-delete-char?)
正确解释Ch在Carbon Emacs.app中有'help'并在Terminal.app中使用/ usr / bin / emacs。 我确定我在这里缺少一些简单的东西。 Emacs describe-bindings显示ch正确映射为help。 所以似乎xterm或X11看到了一个ch键,然后向emacs发送一个退格。 这种行为可以改变吗?
C-h is correctly interpreted has 'help' in Carbon Emacs.app and using /usr/bin/emacs in Terminal.app. I'm sure I'm missing something simple here. Emacs describe-bindings shows c-h is rightly mapped to help. So it seems like xterm or X11 sees a c-h keypress and then sends a backspace to emacs. Can this behavior be changed?
原文:https://stackoverflow.com/questions/1811905
最满意答案
我终于能够解决它了。 对于那些感兴趣的人,这是如何:
为什么在开始转换之前删除半径? 因为目标ImageView没有任何半径。
activity_detail.xml
<ImageView android:id="@+id/iv_image_cover" android:layout_width="match_parent" android:layout_height="250dp" android:scaleType="centerCrop" android:src="@{animal.imageRes}" android:transitionName="animalImage" tools:src="@drawable/acat" />
当我使用没有半径的CardView时,它并不显着,但它实际上变成了目标共享视图。
- 要实现半径到无半径转换,您必须将目标共享视图设置为四舍五入。 我只是使用卡片视图(半径)包裹它。
activity_detail.xml
<android.support.v7.widget.CardView android:id="@+id/card" android:layout_width="match_parent" android:layout_height="wrap_content" android:transitionName="card" app:cardCornerRadius="25dp" > <ImageView android:id="@+id/iv_image_cover" android:layout_width="match_parent" android:layout_height="250dp" android:scaleType="centerCrop" android:src="@{animal.imageRes}" android:transitionName="animalImage" tools:src="@drawable/acat" /> </android.support.v7.widget.CardView>
- 务必将makeSceneTransition更改为使用“card”而不是“animalImage”
ListActivity.class
ActivityOptionsCompat option = ActivityOptionsCompat .makeSceneTransitionAnimation(ListActivity.this, cardView, "card"); startActivity(intent, option.toBundle());
- 在DetailActivity中,您可以在转换开始时启动半径动画。
DetailActivity.java
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().getSharedElementEnterTransition() .addListener(new Transition.TransitionListener() { @Override public void onTransitionStart(Transition transition) { ObjectAnimator animator = ObjectAnimator .ofFloat(activityDetailBinding.card, "radius", 0); animator.setDuration(250); animator.start(); } }); }
- 享受平稳过渡
I finally able to solve it. For those who are interested, here's how:
Why it remove radius before starting transition? Because the target ImageView doesn't have any radius.
activity_detail.xml
<ImageView android:id="@+id/iv_image_cover" android:layout_width="match_parent" android:layout_height="250dp" android:scaleType="centerCrop" android:src="@{animal.imageRes}" android:transitionName="animalImage" tools:src="@drawable/acat" />
When I use CardView without radius, it's not noticable, but it's actually turned into target Shared View.
- To achieve radius to no-radius transition you have to set the target Shared View to be rounded. I'm simply wrap it using a Card View (with radius).
activity_detail.xml
<android.support.v7.widget.CardView android:id="@+id/card" android:layout_width="match_parent" android:layout_height="wrap_content" android:transitionName="card" app:cardCornerRadius="25dp" > <ImageView android:id="@+id/iv_image_cover" android:layout_width="match_parent" android:layout_height="250dp" android:scaleType="centerCrop" android:src="@{animal.imageRes}" android:transitionName="animalImage" tools:src="@drawable/acat" /> </android.support.v7.widget.CardView>
- Be sure to change your makeSceneTransition to use "card" instead of "animalImage"
ListActivity.class
ActivityOptionsCompat option = ActivityOptionsCompat .makeSceneTransitionAnimation(ListActivity.this, cardView, "card"); startActivity(intent, option.toBundle());
- In the DetailActivity, you can start a radius animation when the transition start.
DetailActivity.java
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().getSharedElementEnterTransition() .addListener(new Transition.TransitionListener() { @Override public void onTransitionStart(Transition transition) { ObjectAnimator animator = ObjectAnimator .ofFloat(activityDetailBinding.card, "radius", 0); animator.setDuration(250); animator.start(); } }); }
- Enjoy the smooth transition
Note: gist for layout and activities
相关问答
更多-
我再次浏览了开发人员文档 ,发现: 在API 20之前和之前,CardView不会为卡片边界修剪圆角。 相反,它将填充添加到内容,以便它不会与圆角重叠。 所以对于前棒棒糖设备,我必须调用setPreventCornerOverlap (false); 在cardview上。 更新:通过在卡片视图中添加app:cardPreventCornerOverlap="false" ,可以通过xml代码完成相同操作。 I went through the developer docs again and found ...
-
您可以通过使用卡片视图包装回收器视图而不是包裹每个单元格来轻松完成此操作。
CardView电梯触摸(CardView lift on touch)[2022-09-19]
尝试所以,问题出在了 backgroundColor = Color.WHITE 它被设置为ColorDrawable的默认背景DRAWABLE参数,而不是内部的RoundRectDrawable 。 所以,当我将这一行更改为: background.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP) 所有开始工作和角落变得圆润 So, the problem was in backgroundColor = Color.WHITE It was s ...li元素背景不遵守转换时的边界半径(li element backgrounds not obeying the border radius on transformations)[2022-05-23]
事实证明,这仍然可以通过使用这个答案来解决,但不是在li元素中放置position: relative和z-index: 1 ,而是应该将它放在ul父元素中。 ul { position: relative; z-index: 1; ... } 请参阅此JSFiddle ,例如它应该像它一样工作。 It turns out that this can still be solved by using this answer but instead of placing position: re ...活动和片段共享转换可能很难调试。 默认情况下,动画速度很快,有时眼睛只能看到“有什么问题”,但要弄清楚为什么可以是不重要的。 在调试从A到B的共享转换时,我通常会发现对Override onMapSharedElements方法非常有用,因此您可以轻松找出A中的哪些共享元素与B中的元素相关联。像这样(在B的onCreate()方法中: setEnterSharedElementCallback(new SharedElementCallback() { @Override ...Cardview - 为什么每个元素只绘制直到数据结束(Cardview - why each element is painted only until the end of data)[2022-07-31]
用这个代替你的代码 public void onBindViewHolder(MyHolder holder, int position) { holder.nametxt.setText(tasksObj.get(position).getData()); holder.nametxt.setTextSize(14); holder.itemView.setBackgroundColor(Color.parseColor("#ffff99")); } Replace your c ...recyclerview项目的根视图高度,在这种情况下, LinearLayout不应该是match_parent。 设定一个固定值。 height of root view of recyclerview item, in this case LinearLayout should not be match_parent. set a fixed value.我终于能够解决它了。 对于那些感兴趣的人,这是如何: 为什么在开始转换之前删除半径? 因为目标ImageView没有任何半径。 activity_detail.xml无法为CardView Android Transition创建图层(Unable to create layer for CardView Android Transition)[2022-05-01]
首次尝试修复: 在RowItem rootLayout上设置android:transitionGroup="false"就好像我在ViewPager或者RecyclerView上设置它一样会发生同样的崩溃。另一个重要的步骤是在自定义TextView类的hasOverlappingRendering()上返回false 。 但是这导致ExitTransition有一个ExitTransition背景颜色另一个奇怪的问题我将在此更多地挖掘并且不会接受这个答案,直到我找到解决flickery背景或其他人有不同的 ...相关文章
更多- learn C on the mac 读后笔记
- mac10.9+php5.5.15+brew0.9.5的安装
- 【Hadoop实战】在Mac OS上编译 Hadoop Pipes 库
- mac10.9下eclipse的storm开发环境搭建
- mac php solr扩展安装
- 在如何获得另一台主机的网卡的MAC
- 【Hadoop实战】在Mac OS上配置Hadoop伪分布式环境
- Mac OS X 10.7.2下搭建hadoop1.0.3伪分布式模式
- 【原】storm源码之mac os x编译twitter storm源码
- 微信为什么发布 Mac 版?
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)