- 浏览: 580381 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (338)
- 已过时文章(留念用) (39)
- Android学习笔记 (30)
- Android开发指引自译 (100)
- Android NDK文档自译 (23)
- Android设计指引自译 (2)
- xp(ペケピー)&linux(理奈、铃)酱~ (4)
- ui酱&歌词自译~ (9)
- lua酱~ (9)
- 自我反省 (1)
- 羽game计划 (1)
- XSL酱 (2)
- java酱 (3)
- 设计的领悟 (58)
- 涂鸦作品(pixiv) (1)
- ruby酱 (2)
- Objective-C编程语言自译 (2)
- Android开发月报 (6)
- objc酱 (2)
- photoshop (3)
- js酱 (6)
- cpp酱 (8)
- antlr酱 (7)
- Lua 5.1参考手册自译 (11)
- 收藏品 (3)
- 待宵草计划 (4)
- 体验版截图 (1)
最新评论
-
naruto60:
太给力了!!!!我这网打不开Intel官网,多亏楼主贴了连接, ...
使用HAXM加速的Android x86模拟器(和一些问题) -
yangyile2011:
谢谢博主,翻译得很好哦
【翻译】(4)片段 -
ggwang:
牙痛的彼岸:痹!
牙痛的彼岸 -
ggwang:
总结得很简练清晰啊,学习了!
ANTLR学习笔记一:概念理解 -
leisurelife1990:
mk sdd
用git下载Android自带app的源代码
【翻译】(22)样式与主题
see
http://developer.android.com/guide/topics/ui/themes.html
原文见
http://developer.android.com/guide/topics/ui/themes.html
-------------------------------
Styles and Themes
样式与主题
-------------------------------
In this document
本文目录
* Defining Styles 定义样式
* Inheritance 继承
* Style Properties 样式属性
* Applying Styles and Themes to the UI 应用样式和主题到用户界面
* Apply a style to a View 应用样式到一个View
* Apply a theme to an Activity or application 应用一个主题到一个Activity或应用程序
* Select a theme based on platform version 基于平台版本选择一个主题
* Using Platform Styles and Themes 使用平台样式和主题
See also
另见
Style and Theme Resources 样式与主题资源
R.style for Android styles and themes 用于Android样式和主题的R.style
R.attr for all style attributes 用于所有样式属性的R.attr
-------------------------------
A style is a collection of properties that specify the look and format for a View or window. A style can specify properties such as height, padding, font color, font size, background color, and much more. A style is defined in an XML resource that is separate from the XML that specifies the layout.
样式是一个属性集合,它指定一个View或窗口的外观和格式。一个样式可以指定属性诸如高度,内边距,字体颜色,字体大小,背景颜色,以及更多。一个样式被定义在一个XML资源内,它与指定布局的XML分离。
Styles in Android share a similar philosophy to cascading stylesheets in web design—they allow you to separate the design from the content.
在Android中样式共享一个类似于网页开发中层叠样式表的哲学——它们允许你从内容中分离设计。
For example, by using a style, you can take this layout XML:
例如,通过使用一个样式,你可以把这个布局XML:
-------------------------------
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#00FF00"
android:typeface="monospace"
android:text="@string/hello" />
-------------------------------
And turn it into this:
把它转成这样:
-------------------------------
<TextView
style="@style/CodeFont"
android:text="@string/hello" />
-------------------------------
All of the attributes related to style have been removed from the layout XML and put into a style definition called CodeFont, which is then applied with the style attribute. You'll see the definition for this style in the following section.
所有与样式相关的属性被移除出布局XML,并且放进一个称为CodeFont的样式定义,然后它被用style属性来应用。你将在以下章节中看到这个样式的定义。
A theme is a style applied to an entire Activity or application, rather than an individual View (as in the example above). When a style is applied as a theme, every View in the Activity or application will apply each style property that it supports. For example, you can apply the same CodeFont style as a theme for an Activity and then all text inside that Activity will have green monospace font.
一个主题是一个应用到整个Activity或应用程序的样式,而非一个单独的View(如上面的示例中那样)。当一个样式被应用为一个主题时,Activity或应用程序中任一View将应用它支持的每个风格属性。例如,你可以应用相同的CodeFont样式作为一个Activity的主题,然后在那个Activity内的所有文本将拥有绿色等宽字体。
-------------------------------
Defining Styles
定义样式
To create a set of styles, save an XML file in the res/values/ directory of your project. The name of the XML file is arbitrary, but it must use the .xml extension and be saved in the res/values/ folder.
为了创建一组样式,保存一个XML文件在你的工程的res/values/目录下。XML文件的名称是任意的,但它必须使用.xml扩展名并且保存在res/values/文件夹中。
The root node of the XML file must be <resources>.
XML文件的根节点必须是<resources>。
For each style you want to create, add a <style> element to the file with a name that uniquely identifies the style (this attribute is required). Then add an <item> element for each property of that style, with a name that declares the style property and a value to go with it (this attribute is required). The value for the <item> can be a keyword string, a hex color, a reference to another resource type, or other value depending on the style property. Here's an example file with a single style:
对于你想创建的每个样式,添加一个<style>元素到文件,带有一个唯一标识样式的名称(这个属性是必需的)。然后为那个样式的每个属性添加一个<item>元素,带有一个声明样式属性的名称和伴随它的值(这个属性是必需的)。<item>的值可以是关键词字符串,十六进制颜色,另一个资源类型的引用,或其它依赖于样式属性的值。这里有一个带有单一样式的示例文件:
-------------------------------
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CodeFont" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">#00FF00</item>
<item name="android:typeface">monospace</item>
</style>
</resources>
-------------------------------
Each child of the <resources> element is converted into an application resource object at compile-time, which can be referenced by the value in the <style> element's name attribute. This example style can be referenced from an XML layout as @style/CodeFont (as demonstrated in the introduction above).
<resources>元素的每个子节点在编译期被转换为一个应用程序资源对象,它可以被<style>元素的name属性的值引用。这个示例样式可以从一个XML布局中被引用为@style/CodeFont(正如上面的介绍中所演示的那样)。
The parent attribute in the <style> element is optional and specifies the resource ID of another style from which this style should inherit properties. You can then override the inherited style properties if you want to.
<style>元素中的parent属性是可选的并且指定其它样式的资源ID,而这个样式应该从它那里继承属性。然后你可以覆盖继承的样式属性如果你希望的话。
Remember, a style that you want to use as an Activity or application theme is defined in XML exactly the same as a style for a View. A style such as the one defined above can be applied as a style for a single View or as a theme for an entire Activity or application. How to apply a style for a single View or as an application theme is discussed later.
记住,一个你希望使用作为一个Activity或应用程序主题的样式被定义在XML中,与作为一个View的样式完全相同。一个样式诸如上面定义的那个可以被应用为用于单一View的样式或作为用于整个Activity或应用程序的主题。稍后讨论如何应用样式到一个单一View或作为一个应用程序的主题。
Inheritance
继承
The parent attribute in the <style> element lets you specify a style from which your style should inherit properties. You can use this to inherit properties from an existing style and then define only the properties that you want to change or add. You can inherit from styles that you've created yourself or from styles that are built into the platform. (See Using Platform Styles and Themes, below, for information about inheriting from styles defined by the Android platform.) For example, you can inherit the Android platform's default text appearance and then modify it:
<style>元素的parent属性让你指定一个样式,你的样式应该从这个样式中继承属性。你可以使用它从一个现存样式中继承属性,然后只定义你希望改变或添加的属性。你可以从你曾经自己创建的样式或从内建进平台的样式中继承。(参见下面的使用平台样式和主题章节,获取关于从Android平台定义的样式中继承的信息。)例如,你可以继承Android平台的默认文本外观然后修改它:
-------------------------------
<style name="GreenText" parent="@android:style/TextAppearance">
<item name="android:textColor">#00FF00</item>
</style>
-------------------------------
If you want to inherit from styles that you've defined yourself, you do not have to use the parent attribute. Instead, just prefix the name of the style you want to inherit to the name of your new style, separated by a period. For example, to create a new style that inherits the CodeFont style defined above, but make the color red, you can author the new style like this:
如果你希望从你自己定义的的样式中继承,那么你不必使用parent属性。取而代之的是,只要把你希望继承的样式名称作为你的新样式名称的前缀,通过一个句号来分隔。例如,为了创建一个继承上面定义的CodeFont样式的新样式,但把颜色变成红色,你可以像这样创作新的样式:
-------------------------------
<style name="CodeFont.Red">
<item name="android:textColor">#FF0000</item>
</style>
-------------------------------
Notice that there is no parent attribute in the <style> tag, but because the name attribute begins with the CodeFont style name (which is a style that you have created), this style inherits all style properties from that style. This style then overrides the android:textColor property to make the text red. You can reference this new style as @style/CodeFont.Red.
注意在<style>标签中没有parent属性,但因为name属性以CodeFont样式名称开头(它是你曾经创建的一个样式),这个样式从那个属性中继承所有样式属性。然后这个样式覆盖android:textColor属性使文本变红。你可以引用这个新的样式作为@style/CodeFont.Red。
You can continue inheriting like this as many times as you'd like, by chaining names with periods. For example, you can extend CodeFont.Red to be bigger, with:
你可以通过用句号链接名称,像这样继续继承如你喜欢的那样的多次。例如,你可以用这种方法扩展CodeFont.Red以变得更大:
-------------------------------
<style name="CodeFont.Red.Big">
<item name="android:textSize">30sp</item>
</style>
-------------------------------
This inherits from both CodeFont and CodeFont.Red styles, then adds the android:textSize property.
它同时继承CodeFont和CodeFont.Red风格,然后添加android:textSize属性。
-------------------------------
Note: This technique for inheritance by chaining together names only works for styles defined by your own resources. You can't inherit Android built-in styles this way. To reference a built-in style, such as TextAppearance, you must use the parent attribute.
注意:这种通过链接名称在一起来继承的技术只工作于被你自己的资源定义的样式。你不能用这种方式继承Android的内建样式。为了引用一个内建样式,诸如TextAppearance,你必须使用parent属性。
-------------------------------
Style Properties
样式属性
Now that you understand how a style is defined, you need to learn what kind of style properties—defined by the <item> element—are available. You're probably familiar with some already, such as layout_width and textColor. Of course, there are many more style properties you can use.
现在你理解样式是如何被定义的,你需要知道有什么类型的样式属性——用<itme>元素定义——是可用的。你很可能已经熟悉一些,诸如layout_width和textColor。当然,有其它许多你可以使用的样式属性。
The best place to find properties that apply to a specific View is the corresponding class reference, which lists all of the supported XML attributes. For example, all of the attributes listed in the table of TextView XML attributes can be used in a style definition for a TextView element (or one of its subclasses). One of the attributes listed in the reference is android:inputType, so where you might normally place the android:inputType attribute in an <EditText> element, like this:
找寻被应用到一个特定View的属性的最佳地方是相应的类参考文档,它列举所有支持的XML属性。例如,在TextView XML属性表格中列举的所有属性可以用于TextView元素的样式定义中(或它的其中一个子类)。其中有一个列举在参考中的属性叫android:inputType,所以在你可能通常放置android:inputType属性在一个<EditText>元素内的地方,像这样:
-------------------------------
<EditText
android:inputType="number"
... />
-------------------------------
You can instead create a style for the EditText element that includes this property:
取而代之,你可以为包含这个属性的EditText元素创建一个样式。
-------------------------------
<style name="Numbers">
<item name="android:inputType">number</item>
...
</style>
-------------------------------
So your XML for the layout can now implement this style:
这样你的布局XML现在可以实现这个样式:
-------------------------------
<EditText
style="@style/Numbers"
... />
-------------------------------
This simple example may look like more work, but when you add more style properties and factor-in the ability to re-use the style in various places, the pay-off can be huge.
这个简单示例可能看起来比较好,但当你添加更多更多样式属性并提取功能因子以在不同的地方重用样式时,开销可能是巨大的。
For a reference of all available style properties, see the R.attr reference. Keep in mind that all View objects don't accept all the same style attributes, so you should normally refer to the specific View class for supported style properties. However, if you apply a style to a View that does not support all of the style properties, the View will apply only those properties that are supported and simply ignore the others.
想获取所有可用样式属性的参考文档,请参见R.attr参考文档。请牢记所有View对象不接受所有相同的样式属性,所以你通常应该对支持的样式属性引用特定的View类。然而,如果你应用一个样式到一个不支持所有样式属性的View,该View将只应用那些支持的属性并且简单地忽略掉其它属性。
Some style properties, however, are not supported by any View element and can only be applied as a theme. These style properties apply to the entire window and not to any type of View. For example, style properties for a theme can hide the application title, hide the status bar, or change the window's background. These kind of style properties do not belong to any View object. To discover these theme-only style properties, look at the R.attr reference for attributes that begin with window. For instance, windowNoTitle and windowBackground are style properties that are effective only when the style is applied as a theme to an Activity or application. See the next section for information about applying a style as a theme.
然而,一些样式属性不被任何View元素支持并且只可以被应用为一个主题。这些样式属性应用到整个窗口而不会应用到任何类型的View。例如,一个主题的样式属性可以隐藏应用程序标题,隐藏状态栏,或改变窗口的背景。这些类型的样式属性不属于任何View对象。为了发现这些只限于主题的样式属性,请查看R.attr关于window开头的属性的参考。例如,windowNoTitle和windowBackground是样式属性,它仅当样式被应用为一个Activity或应用程序的主题时才有效。参见下一章节以获取关于把样式应用为主题的信息。
-------------------------------
Note: Don't forget to prefix the property names in each <item> element with the android: namespace. For example: <item name="android:inputType">.
注意:不要忘记用android:名字空间前缀每个<item>元素的属性名称。例如:<item name="android:inputType">
-------------------------------
-------------------------------
Applying Styles and Themes to the UI
应用样式和主题到用户界面
There are two ways to set a style:
有两种方式设置一个样式:
* To an individual View, by adding the style attribute to a View element in the XML for your layout.
* 对于一个单独的View,通过添加style属性到你的布局XML中的一个View元素。
* Or, to an entire Activity or application, by adding the android:theme attribute to the <activity> or <application> element in the Android manifest.
* 或者,对于整个Activity或应用程序,通过在Android清单中添加android:theme属性到<activity>或<application>元素。
When you apply a style to a single View in the layout, the properties defined by the style are applied only to that View. If a style is applied to a ViewGroup, the child View elements will not inherit the style properties—only the element to which you directly apply the style will apply its properties. However, you can apply a style so that it applies to all View elements—by applying the style as a theme.
当你引用一个样式到布局内的单一View时,被样式定义的属性仅应用在那个View上。如果一个样式被应用到一个ViewGroup,那么子View元素将不会继承样式属性——只有你直接把样式应用到的元素才会应用它的属性。然而,你可以应用一个样式,使它应用到所有View元素——通过应用一个样式作为一个主题。
To apply a style definition as a theme, you must apply the style to an Activity or application in the Android manifest. When you do so, every View within the Activity or application will apply each property that it supports. For example, if you apply the CodeFont style from the previous examples to an Activity, then all View elements that support the text style properties will apply them. Any View that does not support the properties will ignore them. If a View supports only some of the properties, then it will apply only those properties.
为了把一个样式定义应用为一个主题,你必须在Android清单中把样式应用到一个Activity或应用程序。当你这样做时,Activity或应用程序内的每个View将应用它支持的每个属性。例如,如果你应用来自前面示例中的CodeFont样式到一个Activity,那么所有支持text样式属性的View元素将应用它们。任何不支持该属性的View将忽略它们。如果一个View只支持其中一些属性,那么它将只应用那些属性。
Apply a style to a View
应用一个样式到一个View
Here's how to set a style for a View in the XML layout:
这里是如何为XML布局内的View设置样式:
-------------------------------
<TextView
style="@style/CodeFont"
android:text="@string/hello" />
-------------------------------
Now this TextView will be styled as defined by the style named CodeFont. (See the sample above, in Defining Styles.)
现在这个TextView将被样式化为称为CodeFont的样式所定义的那样。(见上面的示例,在定义样式章节中。)
-------------------------------
Note: The style attribute does not use the android: namespace prefix.
注意:style属性不使用android:名字空间前缀。
-------------------------------
Apply a theme to an Activity or application
应用一个主题到一个Activity或应用程序
To set a theme for all the activities of your application, open the AndroidManifest.xml file and edit the <application> tag to include the android:theme attribute with the style name. For example:
为了为你的应用程序的所有活动设置一个样式,打开AndroidManifest.xml文件并编辑<application>标签以包含带有样式名称的android:theme属性。例如:
-------------------------------
<application android:theme="@style/CustomTheme">
-------------------------------
If you want a theme applied to just one Activity in your application, then add the android:theme attribute to the <activity> tag instead.
如果你希望一个主题在你的应用程序中应用到仅一个Activity上,那么改为添加android:theme属性到<activity>标签上。
Just as Android provides other built-in resources, there are many pre-defined themes that you can use, to avoid writing them yourself. For example, you can use the Dialog theme and make your Activity appear like a dialog box:
正如Android提供其他内建资源,有许多你可以使用的预定义主题,以避免自己书写它们。例如,你可以使用Dialog主题让你的Activity显得像一个对话框:
-------------------------------
<activity android:theme="@android:style/Theme.Dialog">
-------------------------------
Or if you want the background to be transparent, use the Translucent theme:
或者如果你希望背景是透明的,那么使用Translucent(注:半透明)主题:
-------------------------------
<activity android:theme="@android:style/Theme.Translucent">
-------------------------------
If you like a theme, but want to tweak it, just add the theme as the parent of your custom theme. For example, you can modify the traditional light theme to use your own color like this:
如果你喜欢一个主题,但希望调整它,那么只要添加该主题作为你自定义主题的父主题。例如,你可以修改传统的浅色主题以使用你自己的颜色,像这样:
-------------------------------
<color name="custom_theme_color">#b0b0ff</color>
<style name="CustomTheme" parent="android:Theme.Light">
<item name="android:windowBackground">@color/custom_theme_color</item>
<item name="android:colorBackground">@color/custom_theme_color</item>
</style>
-------------------------------
(Note that the color needs to supplied as a separate resource here because the android:windowBackground attribute only supports a reference to another resource; unlike android:colorBackground, it can not be given a color literal.)
(注意这里的颜色需要提供以作为一个分离的资源,因为android:windowBackground属性只支持指向另一个资源的引用;不像android:colorBackground,它不能赋予一个颜色字面值。)
Now use CustomTheme instead of Theme.Light inside the Android Manifest:
注意在Android清单中使用CustomTheme而非Theme.Light:
-------------------------------
<activity android:theme="@style/CustomTheme">
-------------------------------
Select a theme based on platform version
基于平台版本选择一个主题
Newer versions of Android have additional themes available to applications, and you might want to use these while running on those platforms while still being compatible with older versions. You can accomplish this through a custom theme that uses resource selection to switch between different parent themes, based on the platform version.
较新版本的Android拥有对于应用程序可用的附加主题,而你可能希望在运行于这些平台上时使用这些主题但仍然兼容较旧的版本。你可以通过一个使用资源选择以切换不同的父主题的自定义主题来做到这点,基于平台版本。
For example, here is the declaration for a custom theme which is simply the standard platforms default light theme. It would go in an XML file under res/values (typically res/values/styles.xml):
例如,这里是用于自定义主题的声明,它简单地是标准平台的默认浅色主题。它将放进res/values下的一个XML文件(典型地是res/values/styles.xml):
-------------------------------
<style name="LightThemeSelector" parent="android:Theme.Light">
...
</style>
-------------------------------
To have this theme use the newer holographic theme when the application is running on Android 3.0 (API Level 11) or higher, you can place an alternative declaration for the theme in an XML file in res/values-v11, but make the parent theme the holographic theme:
为了让这个主题在运行于Android 3.0(API级别11)或更高时使用较新的全息主题,你可以在res/values-v11内的一个XML文件中放置这种主题的可选声明,但要让父主题是全息主题:
-------------------------------
<style name="LightThemeSelector" parent="android:Theme.Holo.Light">
...
</style>
-------------------------------
Now use this theme like you would any other, and your application will automatically switch to the holographic theme if running on Android 3.0 or higher.
现在像你用其它任意主题那样使用这种主题,并且你的应用程序将自动地切换到全息主题如果它运行在Android 3.0或更高。
A list of the standard attributes that you can use in themes can be found at R.styleable.Theme.
在主题中你可以使用一列能在R.styleable.Theme中找到的标准属性。
For more information about providing alternative resources, such as themes and layouts, based on the platform version or other device configurations, see the Providing Resources document.
想获取关于提供可选资源的更多信息,诸如主题和布局,基于平台版本或其它设备配置,请参见提供资源文档。
-------------------------------
Using Platform Styles and Themes
使用平台样式和主题
The Android platform provides a large collection of styles and themes that you can use in your applications. You can find a reference of all available styles in the R.style class. To use the styles listed here, replace all underscores in the style name with a period. For example, you can apply the Theme_NoTitleBar theme with "@android:style/Theme.NoTitleBar".
Android平台提供一个大的样式和主题集合,你可以在你的应用程序中使用它们。你可以在R.style类中找到所有可用样式的参考文档。为了使用这里列举的样式,请把样式名中所有下环线替换为句号。例如,你可以用"@android:style/Theme.NoTitleBar"应用Theme_NoTitleBar主题。
The R.style reference, however, is not well documented and does not thoroughly describe the styles, so viewing the actual source code for these styles and themes will give you a better understanding of what style properties each one provides. For a better reference to the Android styles and themes, see the following source code:
然而,R.style的参考文档并不被良好地文档化而且没有彻底描述样式,所以查看这些样式和主题的实际源代码将让你更好地理解每个样式提供什么样式属性。想获取对Android样式和主题的较好参考,请参见以下源代码:
* Android Styles (styles.xml)
* Android样式(style.xml)
* Android Themes (themes.xml)
* Android主题(themes.xml)
These files will help you learn through example. For instance, in the Android themes source code, you'll find a declaration for <style name="Theme.Dialog">. In this definition, you'll see all of the properties that are used to style dialogs that are used by the Android framework.
这些文件将帮助你用示例来学习。例如,在Android主题源代码中,你将找到<style name="Theme.Dialog">的声明。在这个声明中,你将看到用于样式化被Android框架所使用的对话框的所有属性。
For more information about the syntax used to create styles in XML, see Available Resource Types: Style and Themes.
想获取关于XML中创建样式所使用的语法的更多信息,请参见可用资源类型:样式和主题。
For a reference of available style attributes that you can use to define a style or theme (e.g., "windowBackground" or "textAppearance"), see R.attr or the respective View class for which you are creating a style.
想获取你可以用于定义样式或主题的可用style属性的参考文档(例如,"windowBackground"或"textAppearance"),请参考R.attr或你创建样式所对应的View类。
Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.
除特别说明外,本文在Apache 2.0下许可。细节和限制请参考内容许可证。
Android 4.0 r1 - 09 Dec 2011 11:54
-------------------------------
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
(此页部分内容基于Android开源项目,以及使用根据创作公共2.5来源许可证描述的条款进行修改)
发表评论
-
【翻译】(9-补丁2)电话簿提供者
2012-07-18 12:54 2400【翻译】(9-补丁2)电话簿提供者 see h ... -
【翻译】(8-补丁1)Android接口定义语言(AIDL)
2012-07-02 05:55 2928【翻译】(8-补丁1)Andro ... -
【翻译】(0)应用组件
2012-06-30 23:50 829【翻译】(0)应用组件 see http:// ... -
【翻译】(88)传感器
2012-05-21 21:25 1078【翻译】(88)传感器 ... -
【翻译】(87)复制与粘贴
2012-05-20 14:48 1929【翻译】(87)复制与粘贴 see http: ... -
【翻译】(86)音频捕捉
2012-05-16 15:14 1104【翻译】(86)音频捕捉 ... -
【翻译】(85)照相机
2012-05-13 15:09 3796【翻译】(85)照相机 see http:// ... -
【翻译】(84)JetPlayer
2012-04-21 16:24 981【翻译】(84)JetPlayer see h ... -
【翻译】(83)媒体回放
2012-04-21 16:00 1860【翻译】(83)媒体回放 see http:/ ... -
【翻译】(82)多媒体与照相机
2012-04-18 23:05 953【翻译】(82)多媒体与照相机 see htt ... -
【翻译】(23-补丁3)构建无障碍服务
2012-04-18 21:57 1627【翻译】(23-补丁3)构 ... -
【翻译】(23-补丁2)使应用程序无障碍
2012-04-16 13:08 2099【翻译】(23-补丁2)使应用程序无障碍 see ... -
【翻译】(23-补丁1)无障碍
2012-04-11 22:38 911【翻译】(23-补丁1)无 ... -
【翻译】(81)Renderscript之运行时API参考手册
2012-04-11 22:13 1416【翻译】(81)Renderscript之运行时API参 ... -
【翻译】(80)Renderscript之计算
2012-04-09 14:09 1445【翻译】(80)Renderscript之计算 ... -
【翻译】(79)Renderscript之图形
2012-04-08 13:59 2866【翻译】(79)Renderscript之图形 ... -
【翻译】(78)Renderscript
2012-04-04 15:35 1442【翻译】(78)Renderscript see ... -
【翻译】(77)可绘画对象动画
2012-03-18 10:52 711【翻译】(77)可绘画对象动画 see htt ... -
【翻译】(76)视图动画
2012-03-18 10:04 806【翻译】(76)视图动画 see http:/ ... -
【翻译】(75)属性动画
2012-03-17 18:24 2509【翻译】(75)属性动画 see http:/ ...
相关推荐
本文档旨在介绍Liferay 6.2版本的主题开发过程,通过详细地中文翻译官方文档,帮助中文开发者更好地理解和掌握Liferay主题开发的核心概念和技术细节。 #### 二、Liferay主题概述 Liferay主题(Themes)是一种用于...
《图像处理源码-HiSD-通过分层样式分解实现图像到图像的翻译》 在当前的计算机视觉领域,图像处理技术已经发展得相当成熟,其中图像到图像的翻译技术尤为引人注目。该技术旨在将一张图像的特征转换为另一种图像的...
本主题主要关注Zotero的常用插件,这些插件极大地扩展了其核心功能,包括参考文献管理、文档翻译和样式设置。 1. 参考文献管理: - **Better BibTeX**:这是Zotero中最受欢迎的插件之一,它提供更高级的BibTeX支持...
Constance是一款采用ajax加载的电商主题,整合woocommerce插件,可以做出比较好的电商站点。...4、大部分主题,压缩包内包含了主题的详细使用说明,使用前请认真阅读(英语不好的,可以借助谷歌翻译等翻译工具)。
1. **mtheme** 文件夹:这是主题的主要部分,通常包含主题的配置文件、控制器、模型以及其他与主题功能相关的PHP文件。在苹果CMS中,你需要将这个文件夹上传到你的网站根目录下的`/mtheme/`文件夹,以便系统能识别并...
该主题的"子主题"是一个独立但与主主题紧密相关的模板,它可以保留父主题的所有设计和功能,同时允许用户进行自定义修改,而不会影响到原始主题的设置。子主题的存在使得用户可以在不破坏网站整体外观的情况下,进行...
"piscesopencart"可能是这个主题的主文件或者安装包名称,通常OpenCart的主题会包含HTML、CSS、JavaScript以及其他必要的图像和文件,它们共同构成了主题的视觉样式和功能。 pisces可能是指这个主题的设计风格或特色...
8. **多语言支持**:对于有国际客户群的网站,主题可能支持WPML等多语言插件,便于翻译和管理不同语言的内容。 9. **社交媒体整合**:集成社交媒体分享按钮,方便用户分享商品信息,扩大商品的曝光范围。 10. **...
8. **翻译友好**:对于多语言网站,该主题通常会支持WPML或其他多语言插件,方便不同语种的用户访问。 9. **性能优化**:快速加载速度是提升用户体验的关键,此主题会进行代码优化,减少不必要的资源加载,确保网站...
4. 结构与格式:遵循目标语言的论文格式规范,如APA、MLA或Chicago等引用样式。 此外,翻译不仅仅是文字的转换,更是跨文化交流的过程。译者需要理解原文的上下文,把握作者的意图,同时考虑目标读者的知识背景和...
8. **文档与社区支持**:Bootstrap的中文翻译版文档对于中国开发者来说是一大福音,它使得学习和解决问题更加方便。此外,Bootstrap有一个庞大的开发者社区,提供了许多插件、主题和教程,丰富了框架的功能。 9. **...
核心主题是Moodle提供的基础样式,父主题是在此基础上添加定制的框架,而子主题则是在父主题上进行具体的设计改动。在修改主题前,建议先备份原有的主题文件,以防修改过程中出现问题。 1. **查找和选择主题文件**...
WordPress提供了一个丰富的主题库,允许用户根据自己的品牌和内容需求选择不同的视觉样式。 【新闻杂志主题】是专门针对新闻和杂志类网站设计的WordPress主题。这类主题通常具有多列布局,可以方便地展示大量内容,...
5. **语言文件(.po和.mo)**:支持多语言的网站会包含这些文件,用于翻译主题中的文本。 6. **JavaScript文件**:用于实现交互效果和动态功能。 WordPress主题可以分为免费和付费两种类型。免费主题在WordPress...
如果主题包含需要翻译的文字,如扩展的描述或菜单项,那么这些字符串会被放在`package.nls.json`中。这个文件允许主题针对不同语言的用户提供相应的文本,从而提供更好的用户体验。 总的来说,这个压缩包提供了一个...
《2014-2020年扬州大学626日语翻译与写作考研真题》这份资源是针对有志于报考扬州大学626日语翻译与写作研究生课程的考生的重要参考资料。日语翻译与写作是日语专业研究生考试中的核心科目,它涵盖了语言的准确理解...
5. `source/js/`:JavaScript文件夹,存放与主题交互相关的脚本。 6. `languages/`:语言文件夹,包含不同语言的翻译文件,用于多语言支持。 7. `README.md`:主题的说明文档,介绍如何安装和配置该主题。 安装这个...
1. CSS文件:通过链接或内联方式引入CSS文件,定义不同主题的样式。 2. 布局模板:创建可重用的页面布局模板,根据主题切换不同的CSS类或部分HTML内容。 3. 动态加载:根据用户选择或系统配置动态加载相应的主题资源...
在WordPress中,语言翻译通常涉及到Poedit这样的工具,用来创建和编辑`.po`和`.mo`文件,这些文件存储了插件或主题的翻译字符串。开发者可能通过在代码中添加`__()`或`_e()`等函数来标记可翻译的文本,然后Poedit会...
style.css是定义主题样式的文件,你需要在这里编写CSS代码来控制元素的布局、颜色、字体等。WordPress要求在style.css顶部添加一个特殊的注释块,包含主题信息,例如: ``` /* Theme Name: My Custom Theme Author: ...