首页 \ 问答 \ 使用Sencha Touch中的图像处理不同的分辨率触摸设备(Working with images in Sencha Touch for different Resolution Touch Device)

使用Sencha Touch中的图像处理不同的分辨率触摸设备(Working with images in Sencha Touch for different Resolution Touch Device)

我打算使用Sencha Touch 2.x为我的网站移动(轻量级)视图。

我是Sencha开发的新手。 我非常了解HTML 5。 在我继续开发之前,我想知道一些事情。

  1. Sencha如何管理图像。 因为我打算使用不同分辨率的触摸设备(即iphone4s,iphone 5,iPad,Android和Blackberry 10)。 我知道在HTML 5中使用的媒体查询。我们是否需要为每个分辨率传递不同的图像,或者sencha将比较每个分辨率的图像。 (仅供参考...我也遇到过如何在sencha touch中添加不同屏幕分辨率的图像?建议使用HTML5媒体查询。这是唯一的方法吗?还可以参考在Sencha Touch中为不同的移动设备分辨率创建启动画面用于闪屏)

  2. 是否支持Retina Display? (即iOS中的@ 2x)。 如果不是我们如何管理视网膜显示图像。

提前感谢任何有价值的建议。


I'm planning to use Sencha Touch 2.x for my websites mobile (Light weight) view.

I am new to Sencha development. I know HTML 5 very well. Couple of things I would like to know before I would proceed with the development.

  1. How Sencha manages the images. As I am planning to work with different resolution touch devices (i.e. iphone4s, iphone 5, iPad, Android and Blackberry 10). I know media query that used in HTML 5. Do we need to pass different images for each resolution or sencha will compare image for each resolution. (FYI... I also come across also How to add images for different screen resolutions in sencha touch? suggest the HTML5 media query. Is it the only way? and also refer Creating a splash screen in Sencha Touch for different mobile devices resolutions which is for splash screen)

  2. Is it support Retina Display? (i.e. @2x in iOS). if not than how we can manage the retina display images.

Thanks in advance for any valuable suggestion.


原文:https://stackoverflow.com/questions/15337795
更新时间:2022-07-25 16:07

最满意答案

在Log4j 2初始化期间,配置中的所有插件都将被处理并存储在Node对象中。 实现Node.toString()方法,如果原始Plugin的printObject属性为true,则Node.toString()将委托给Plugin的toString()方法。 否则,它返回一个包含插件类和插件名称的String。

所以一般来说,提供一个好的toString()方法并将printObject声明为true是明智的。 另一方面,如果你错过了它也不是灾难:这主要是为了调试。 因此,如果printObject为true但您没有覆盖toString(),那么所有发生的事情都是在调试插件时您将看不到有用的值。

Log4j 2在DEBUG / TRACE级别向StatusLogger记录初始化过程的详细信息。 如果您的配置以<Configuration status="trace">开头,则可以看到此信息。

自定义插件可以使用printObject属性来影响在配置期间记录到StatusLogger日志记录的内容。 可以肯定的是,在初始化之后,在调试生成的Node值时显示插件的toString()值很有用。


During Log4j 2 initialization, all plugins in the configuration are processed and stored in Node objects. The Node.toString() method is implemented such that if the original Plugin's printObject attribute was true, Node.toString() will delegate to the Plugin's toString() method. Otherwise, it returns a String containing the plugin class and the plugin name.

So in general it is wise to provide a good toString() method and declare printObject to be true. On the other hand, it is not a disaster if you miss either: this is mostly for debugging. So, if printObject is true but you don't override toString(), all that happens is that when debugging your plugin you won't see useful values.

Log4j 2 logs details of the initialization process to the StatusLogger at DEBUG/TRACE level. You can see this information if your configuration starts with <Configuration status="trace">.

It is possible that custom plugins can use the printObject attribute to influence what is logged to the StatusLogger logging during configuration. What is certain is that after initialization, it is useful to have your Plugin's toString() value shown when debugging the resulting Node values.

相关问答

更多
  • 这在log4j2中的工作方式与在log4j-1.2中的工作方式完全不同。 在log4j2中,你会为此创建一个插件。 本手册中有一个自定义appender示例的解释: http : //logging.apache.org/log4j/2.x/manual/extending.html#Appenders 扩展org.apache.logging.log4j.core.appender.AbstractAppender可能会很方便,但这不是必需的。 当您使用@Plugin(name="MyCustomAppe ...
  • 我建议你从RollingFileAppender派生而不是FileAppender派生。 这将使您可以定义日志文件的大小,以及要保留多少“旧”文件。 稍后在log4j.propertiers中查看如何使用它的手册 。 如果我理解正确,你想每个日志级别有一个文件,这是正确的吗? 如果是这样,我建议你按照这个FAQ-Entry而不是“滚动”你自己的解决方案:) 匹配确切的日志级别 I suggest you derive from RollingFileAppender instead of FileAppen ...
  • 1.为了在名称节点更改log4j.properties,可以更改/home/hadoop/log4j.properties。 2.为了更改容器日志的log4j.properties,您需要在容器jar中更改它,因为它们硬编码直接从项目资源加载文件。 2.1 ssh到奴隶(在EMR上,你也可以简单地将它添加为引导操作,所以你不需要ssh到每个节点)。 ssh到hadoop奴隶 2.2在jar资源上覆盖container-log4j.properties: jar uf /home/hadoop/share/h ...
  • 你能展示你的配置的第一行, 元素吗? 您可以指定以使log4j的内部日志记录显示在控制台上,这可能有助于解决问题。 也许log4j无法找到你的插件。 编译插件时,会创建一个序列化插件列表文件。 此文件包含插件的名称和二进制格式的类名。 如果这个文件包含在包含你的插件类的jar中,log4j可以找到你的插件。 另一种帮助log4j找到你的插件的方法是指定你的配置文件的packages属性:
  • 你能在log4j用户邮件列表上问这个吗? 它可能是模式中的错误,但我怀疑模式可以做更多改进,您的反馈将是有价值的。 Can you ask this on the log4j-user mailing list? It could be a bug in the schema, but I suspect the schema can do with more improvements and your feedback would be valuable.
  • 在类KafkaAppender中,你的append方法应该调用getLayout().toByteArray(event)来格式化事件。 我注意到示例代码覆盖了getLayout 。 我不会推荐这个。 getLayout的AbstractAppender实现返回已配置的布局,允许您在配置中控制布局而无需更改代码。 @Override public void append(LogEvent event) { this.lock.lock(); try { // let the ...
  • I am answering my own question. First you need to create a logger and set additivity as FALSE. log4j.logger.XZYLOG=XZYLOG#XYZLOG#com.services.domain.xyzlogs.XYZLogLevel, XYZAPPENDER log4j.additivity.XZYLOG=false log4j.logger.LMNLOG=LMNLOG#XYZLOG#com.se ...
  • 在Log4j 2初始化期间,配置中的所有插件都将被处理并存储在Node对象中。 实现Node.toString()方法,如果原始Plugin的printObject属性为true,则Node.toString()将委托给Plugin的toString()方法。 否则,它返回一个包含插件类和插件名称的String。 所以一般来说,提供一个好的toString()方法并将printObject声明为true是明智的。 另一方面,如果你错过了它也不是灾难:这主要是为了调试。 因此,如果printObject为tr ...
  • Log4j 2检查appender处于可用状态的每个日志事件。 您看到的错误是Log4j检测到appender未准备好使用。 一些appender在使用之前需要做好准备。 start()生命周期方法是appender可以进行初始化的地方。 Log4j不会将事件路由到未处于STARTED状态的appender。 如果您的appender是通过配置添加的,Log4j将调用生命周期方法。 如果您的appender扩展AbstractAppender,这将更新状态,应该足够了。 否则,请查看AbstractAppe ...
  • 您可以将自定义插件定义为具有不同的名称。 那应该可以解决问题。 You can define your custom plugin to have a different name. That should resolve the problem.

相关文章

更多

最新问答

更多
  • 您如何使用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)