I checked the suggested similar threads, but didn't see anything that seemed to pertain to my question......
Anywa, it seems that I might be in way over my head, but still, it seems that this should be simple to do? In system/etc there is an xml file, fallback_fonts.xml which determines the order in which fonts will be searched to handle glyphs that are not system level fonts. I wish to modify that file.
The problem I wish to address is the proper display of Japanese fonts. In this xml file, DroidSansFallback.ttf comes before MTLmr3m.ttf. As a result, simplified Chinese fonts are always selected rather than the Japanese font (MTLmr3m.ttf). While many of the characters are the same as the Japanese versions, a significant number are not. I found a couple of xml editors on the web (XML Notepad 2007 and FirstObject XML editor) and used each of them to move MTLmr3m.ttf before DroidSansFallback.ttf. However, after saving, renaming and rebooting, the entire file appeared to have been corrupted, no matter which editor I used. For example, not only do I not have any Asian fonts, but One More Clock is unable to display time and temperature. So it appears that this is not as simple as I assumed.
In the Android 4.1 distribution for the GNex, there was also a fallback_fonts-ja.xml which placed MTLmr3m.ttf before DroidSansFallback.ttf. Therefore, it was a simple matter to rename and substitute that file and all was good. However, the 4.2 distribution does not include a fallback_fonts-ja.xml file. But I thought, I will make my own fallback_fonts-ja.xml! How hard can it be? Well...
So, I am hoping that this is in fact a simple process for more experienced and capable folks and that someone will be kind enough to show me how to do this.
Thanks much!
<?xml version="1.0" encoding="utf-8"?>
<!--
Fallback Fonts
This file specifies the fonts, and the priority order, that will be searched for any
glyphs not handled by the default fonts specified in /system/etc/system_fonts.xml.
Each entry consists of a family tag and a list of files (file names) which support that
family. The fonts for each family are listed in the order of the styles that they
handle (the order is: regular, bold, italic, and bold-italic). The order in which the
families are listed in this file represents the order in which these fallback fonts
will be searched for glyphs that are not supported by the default system fonts (which are
found in /system/etc/system_fonts.xml).
Note that there is not nameset for fallback fonts, unlike the fonts specified in
system_fonts.xml. The ability to support specific names in fallback fonts may be supported
in the future. For now, the lack of files entries here is an indicator to the system that
these are fallback fonts, instead of default named system fonts.
There is another optional file in /vendor/etc/fallback_fonts.xml. That file can be used to
provide references to other font families that should be used in addition to the default
fallback fonts. That file can also specify the order in which the fallback fonts should be
searched, to ensure that a vendor-provided font will be used before another fallback font
which happens to handle the same glyph.
Han languages (Chinese, Japanese, and Korean) share a common range of unicode characters;
their ordering in the fallback or vendor files gives priority to the first in the list.
Language-specific ordering can be configured by adding a BCP 47-style "lang" attribute to
a "file" element; fonts matching the language of text being drawn will be prioritised over
all others.
-->
<familyset>
<family>
<fileset>
<file variant="elegant">DroidNaskh-Regular.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file variant="compact">DroidNaskh-Regular-SystemUI.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansEthiopic-Regular.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansHebrew-Regular.ttf</file>
<file>DroidSansHebrew-Bold.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansThai.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansArmenian.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansGeorgian.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansDevanagari-Regular.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansTamil-Regular.ttf</file>
<file>DroidSansTamil-Bold.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>AnjaliNewLipi-light.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>Lohit-Bengali.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>Lohit-Kannada.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>NanumGothic.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>AndroidEmoji.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file>DroidSansFallback.ttf</file>
</fileset>
</family>
<family>
<fileset>
<file lang="ja">MTLmr3m.ttf</file>
</fileset>
</family>
<!--
Fonts below this point have problematic glyphs and should not be moved
higher in the fallback list until those glyphs have been fixed.
-->
<family>
<fileset>
<file>Lohit-Telugu.ttf</file> <!-- masks U+FFBC-10007 -->
</fileset>
</family>
</familyset>
Related
hi,
although i have done it on an OmniaII, yet i guess it is applicable on win6.5 regardless of the ppc.
ok,
i searched too much for a cab, or any to control start menu font. change sys font is available, menus but not the start menu.
for no reason i know, the start menu has its own control. i was able to make it 3 or 4 or 5 columns , but not the font
any way manually, go to win folder, locate the following 2 files:
StartMenu_GridScene_480x800.cpr
StartMenu_GridScene_480x800.cpr
they are the files controlling how u see start menu
then open both or any of them - i modified both- u will get the following
=================
<Form Width="480" Height="800">
<StartMenu_GridScene ID="Scene">
<GridView ID="Start Menu Items List" Top="0" Left="0" Width="480" Height="696" Columns="3" Scrollable="TRUE" HexagonGrid="TRUE" HorizontalWrapAround="TRUE">
<Image ID="Selection" Left="0" Top="-30" Width="192" Height="158" Source=".\StartMenu_Selection.png" />
<Layer ID="GridItem" Width="192" Height="166" OnAction ="GridItemAction">
<Layer ID="Normal">
<Image ID="Image" Left="51" Top="4" Width="90" Height="90" ScaleStyle="Fit" />
$$$$$HERE$$$$$ <Text ID="Text" Left="18" Top="98" Width="156" Height= $$$$$$"68" FontFamily="Tahoma" FontSize="7" $$$$$$ HorizontalAlignment="Center" VerticalAlignment="Top" Wrap="True" Trimming="EllipsisCharacter" ForeColor="#00FFFFFF" BackColor="#00000000" />
</Layer>
</Layer>
<Layer ID="NoItems">
<Text ID="Text" Width="480" Height="40" FontFamily="Tahoma" FontSize="10" ForeColor="#00FFFFFF" Wrap="False" HorizontalAlignment="Center" Trimming="Character" InnerTextType="Resource">shellres.dll,22596</Text>
</Layer>
</GridView>
</StartMenu_GridScene>
</Form>
======================
ok, i know nothing about this details except the $$$$$$$ ones - i have added the dollar sign for highlighting
i changed it from 7 to 14 .... for example, so i got what u see in the attached files. the font group can also changed.
i used notepad on my desktop and returned them to my omniaII. every change neeeeeeds restart to take effect.
attached are before and after modification.
PART 1
STEP 1
Dimensioning Your Icons
There are many Software for this you can go for gimp, photoshop, illustrator and many more.
I prefer photoshop.
You can download or purcase from Adobe Store.
Icon size: 136 x 136 (pixels)
STEP 2
Adding layer styles.
Playing with Bleending option.
Add your design your settings add beveal, drop shadow and much more.
IMPORTING ICONS TO MIUI THEME EDITOR
STEP : 1
Now the First thing to DO is Extract the zip file.
STEP : 2
Now GO to MIUI Themes Editor and launch it.
There are two ways of getting started up.
Either select a Theme and Edit or start a new project
STEP : 3
Starting Up a New Project.
[Note: Click on the picture for Enlarging]
STEP : 4
Click on File > New Theme
STEP : 5
Specify a name and Location.
STEP : 6
Later Adding
Theme Name
Author
Designer
Version
PART TWO [ IMPORTANT ]
This is how you reach a fancy icons they are noting but icons with Gif kind of animation we call them dynamic
So what's so special about them ?
Heh!!
You need to know som XML tricks like i am going to show you and i will even share my files which you can edit.
So the above metioned picture is an example how to place it.
FOR CALENDAR
Icons
| __ fancy_icons
|__ com.android.calendar
manifest.xml should be place inside the folders with pngs files
<?xml version="1.0" encoding="utf-8"?>
<!-- calendar -->
<Icon version="1" frameRate="0" width="136" height="136" screenWidth="720" useVariableUpdater="DateTime.Day">
<VariableBinders>
<BroadcastBinder action="android.intent.action.TIME_SET" />
<BroadcastBinder action="android.intent.action.DATE_CHANGED" />
</VariableBinders>
<Group pivotX="68" pivotY="68">
<Image x="68" y="68" align="center" alignV="center" src="date.png" srcid="#date" />
</Group>
</Icon>
You need to edit them accordingly like i have thepng files settled inside the folder com.android.calendar
For Rotational ICONS
<?xml version="1.0" encoding="utf-8"?>
<!-- Audio -->
<Icon version="1" frameRate="30" width="192" height="192" screenWidth="1080" >
<Image x="96" y="96" align="center" alignV="center" src="icon_bg.png" />
<Image x="96" y="96" align="center" alignV="center" centerX="59" centerY="59" src="gear.png" >
<RotationAnimation>
<Rotation angle="0" time="0"/>
<Rotation angle="360" time="10000"/>
</RotationAnimation>
</Image>
</Icon>
And place the Two icons inside the subfolders.
Source : http://en.miui.com/thread-76404-1-1.html
Credits to the OP.
PART 1
STEP 1
Dimensioning Your Icons
There are many Software for this you can go for gimp, photoshop, illustrator and many more.
I prefer photoshop.
You can download or purcase from Adobe Store.
Icon size: 136 x 136 (pixels)
STEP 2
Adding layer styles.
Playing with Bleending option.
Add your design your settings add beveal, drop shadow and much more.
IMPORTING ICONS TO MIUI THEME EDITOR
STEP : 1
Now the First thing to DO is Extract the zip file.
STEP : 2
Now GO to MIUI Themes Editor and launch it.
There are two ways of getting started up.
Either select a Theme and Edit or start a new project
STEP : 3
Starting Up a New Project.
[Note: Click on the picture for Enlarging]
STEP : 4
Click on File > New Theme
STEP : 5
Specify a name and Location.
STEP : 6
Later Adding
Theme Name
Author
Designer
Version
PART TWO [ IMPORTANT ]
This is how you reach a fancy icons they are noting but icons with Gif kind of animation we call them dynamic
So what's so special about them ?
Heh!!
You need to know som XML tricks like i am going to show you and i will even share my files which you can edit.
So the above metioned picture is an example how to place it.
FOR CALENDAR
Icons
| __ fancy_icons
|__ com.android.calendar
manifest.xml should be place inside the folders with pngs files
<?xml version="1.0" encoding="utf-8"?>
<!-- calendar -->
<Icon version="1" frameRate="0" width="136" height="136" screenWidth="720" useVariableUpdater="DateTime.Day">
<VariableBinders>
<BroadcastBinder action="android.intent.action.TIME_SET" />
<BroadcastBinder action="android.intent.action.DATE_CHANGED" />
</VariableBinders>
<Group pivotX="68" pivotY="68">
<Image x="68" y="68" align="center" alignV="center" src="date.png" srcid="#date" />
</Group>
</Icon>
You need to edit them accordingly like i have thepng files settled inside the folder com.android.calendar
For Rotational ICONS
<?xml version="1.0" encoding="utf-8"?>
<!-- Audio -->
<Icon version="1" frameRate="30" width="192" height="192" screenWidth="1080" >
<Image x="96" y="96" align="center" alignV="center" src="icon_bg.png" />
<Image x="96" y="96" align="center" alignV="center" centerX="59" centerY="59" src="gear.png" >
<RotationAnimation>
<Rotation angle="0" time="0"/>
<Rotation angle="360" time="10000"/>
</RotationAnimation>
</Image>
</Icon>
And place the Two icons inside the subfolders.
Hello everyone, I've made a simplified tutorial to make your own watchface widget.
In this update I made simpler source code that simplified some steps.
Thanks to xda for posting it in xda Portal
Requirements:
-Eclipse
-Android SDK
-Sony Add-on SDK
Click to expand...
Click to collapse
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
1-Download the samples.
2-Extract the zip.
3-Copy the both extracted folders to: "android-sdks\add-ons\addon-sony_add-on_sdk_3_0-sony-19\samples\SmartExtensions".
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
4-Open Eclipse and press Ctrl+N, open "Android" and choose "Android Sample Project".
5-Choose "Sony Add-on SDK 3.0".
6-Choose "SmartExtensions > SmartExtensionAPI" and press Finish.
7-Repeat step 4 to 5, choose "SmartExtensions > SmartExtensionUtils" and press Finish.
8-Repeat step 4 to 5, choose "SmartExtensions > ClockWidgetAnalog" if you wanna make an analog clock. or "SmartExtensions > ClockWidgetDigitalList" if you need to make a digital clock. For example, I'll choose the analog clock.
9-Press Finish
10-Now your workspace should looks like this:
11-To rename the project right click on it like this image:
12-Give it any name you want
13-To rename application package right click like this image:
14-Go to: res/values/strings.xml
15-Change these strings and press Ctrl+S to save it.
-You can keep the 'more apps" link if you want. It go to the watch faces collection thread.
-It's optional to add your email, and here's how to remove "Contact me" button:
-Go to res/layout/activity_preference.xml and find this:
Code:
<Button
android:id="@+id/emailBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="[COLOR="Red"]visible[/COLOR]"
android:text="@string/email_btn"/>
-Then change the text marked with red above to "gone". So it will be like this:
Code:
<Button
android:id="@+id/emailBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="[COLOR="Red"]gone[/COLOR]"
android:text="@string/email_btn"/>
16-Change the graphical resources change files in res/drawable-nodpi
17-Connect you device to the pc
18-Enable USB debugging on your phone
19-Right click on the project > Run As > Android application
20-If you want to share the apk you'll find it in the project bin
21-Enjoy
-----------------------------------------------------------------------------------------------------------------------
How To Resize:
1-Go to "AnalogClock.java" or "DigitalClockLevelList.java in src/-package name-.widgets
2-Edit the marked in red below:
Code:
@Override
public int getWidth() {
return getCellWidth() * [COLOR="Red"]5[/COLOR];
}
@Override
public int getHeight() {
return getCellHeight() * [COLOR="Red"]5[/COLOR];
}
-----------------------------------------------------------------------------------------------------------------------
How To Add Date:
1-Create new xml file in "res/layout" and give it any name you want
2-Add this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1" >
[COLOR="RoyalBlue"]<com.sonyericsson.extras.liveware.aef.widget.TimeLayout[/COLOR]
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<com.sonyericsson.extras.liveware.aef.widget.TimeView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:includeFontPadding="false"
android:textColor="[COLOR="DarkOrange"]@android:color/white[/COLOR]"
widgets:textSize="[COLOR="Lime"]25[/COLOR]px"
widgets:timeType="[COLOR="Red"]days_of_month[/COLOR]" />
</com.sonyericsson.extras.liveware.aef.widget.TimeLayout>
</RelativeLayout>
3-You can change the text marked in red above to:
-"days_of_week"
-"days_of_month"
-"days_of_year"
-"months"
4-You can change the number marked in green above to any number you want, to set the font size. Please notice that the unit must be "px" and do not use "dp".
5-You can change on the text marked in orange "white" to "black", or you can remove all the text in orange and put any hex color code. For example:
android:textColor="#ffbf00"
6-To change the position of it, add under "<com.sonyericsson.extras.liveware.aef.widget.TimeLayout" which is marked in blue above:
-android:layout_centerInParent="true" to put it in the center.
-android:layout_centerHorizontal="true" to put it center in horizontal.
-android:layout_centerVertical="true" to put it center in vertical.
-android:layout_alignParentRight="true" to move it to right side.
-android:layout_alignParentLeft="true" to move it to left side.
-android:layout_alignParentTop="true" to move it to to the top.
-android:layout_alignParentBottom="true" to move it to the buttom.
-android:layout_marginRight="10px" change "10" to any number.
-android:layout_marginLeft="10px" change "10" to any number.
-android:layout_marginTop="10px" change "10" to any number.
-android:layout_marginBotton="10px" change "10" to any number.
7-At last, we must include the date xml on the main watch layout xml which is called on my samples "clock_widget_analog.xml" on analog and "clock_widget_levellists.xml" on the digital clock. For example, if you named the xml you made "date.xml" we will add the text marked in red below:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res/com.sonymobile.smartconnect.extension.testclock"
android:layout_width="215px"
android:layout_height="170px"
android:background="@android:color/transparent"
android:baselineAligned="false" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/watchface_bg" />
[COLOR="Red"]<include layout="@layout/date" />[/COLOR]
<include layout="@layout/analog_clock_hand_hours_border" />
<include layout="@layout/analog_clock_hand_minutes_border" />
<include layout="@layout/analog_clock_hand_seconds" />
</RelativeLayout>
-----------------------------------------------------------------------------------------------------------------------
How To Reorder:
1-Open the main layout xml, -"clock_widget_analog.xml" on analog and "clock_widget_levellists.xml" on the digital clock-. For example, I'll work on analog.
2-You can remove text that start with "<!--" and end with "-->" like the marked in red . it's just notes from sony.This will make it easier:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res/com.sonymobile.smartconnect.extension.testclock"
android:layout_width="215px"
android:layout_height="170px"
android:background="@android:color/transparent"
android:baselineAligned="false" >
<!-- We set a background on containing the base for a watch face. -->
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/watchface_bg" />
[COLOR="Red"]<!-- Here we reference a TimeLayout using a single drawable for displaying
the hour hand. -->[/COLOR]
<include layout="@layout/analog_clock_hand_hours_border" />
[COLOR="Red"]<!-- Here we reference a TimeLayout using a single drawable for displaying
the minute hand. -->[/COLOR]
<include layout="@layout/analog_clock_hand_minutes_border" />
[COLOR="Red"]<!-- Here we reference a TimeLayout using a single drawable for displaying
the second hand. Note: Seconds will not be shown when the backlight is off
on the SmartWatch 2. -->[/COLOR]
<include layout="@layout/analog_clock_hand_seconds" />
</RelativeLayout>
3-Now you can reorder lines that start with "<include layout="
-----------------------------------------------------------------------------------------------------------------------
Multiple WatchFace In One App:
-First example is to add digital clock to analog:
1-Copy xml and png files in res/layout and res/drawable-nodpi from digital to analog
2-Copy "DigitalClockLevelList.java" on src/-package name-.widgets from digital to analog
3-Open "ClockWidgetRegistrationInformation" in src/-package name-/ and search for: WidgetClassList widgetList = new WidgetClassList();
4-Add this under WidgetClassList widgetList = new WidgetClassList();:
widgetList.add(DigitalClockLevelList.class);
The text marked in red is same file name you've copied in step 2
5-Now Eclipse will underline it in red as error, it will give you a list of fixes, choose first fix
-Second example if you want to make 2 or more analog watchfaces:
1-Go to res/layout and duplicate all except "activity_preferences.xml", you can rename the duplicated xmls for example by adding "2"
2-Duplicate "AnalogClock.java" in src/-package name-.widgets
3-Add graphical resources on res/drawable-nodpi/ and give it the same names but with "_2"
4-Add the following lines to res/values/strings.xml:
Code:
<string name="name_1">Analog 1</string>
<string name="name_2">Analog 2</string>
To be like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- No translation of sample extensions -->
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="app_name">Analog clock widget</string>
<string name="preference_info">Analog clock watchface widget for Sony SmartWatch2\nDeveloped by Naheel Azawy\nVersion 1.0</string>
[COLOR="Red"]<string name="name_1">Analog 1</string>
<string name="name_2">Analog 2</string>[/COLOR]
</resources>
5-Edit "AnalogClock2.java" in src/-package name-.widgets from:
Code:
package com.naheel.sw2.widget.example.analog.widgets;
import com.naheel.sw2.widget.example.analog.R;
/**
* This widget displays an analog clock providing resources which will be
* automatically rotated by the accessory firmware to reflect the time.
*/
public class AnalogClock2 extends SmartWatch2ClockWidget {
public AnalogClock2(WidgetBundle widgetBundle) {
super(widgetBundle);
}
@Override
int getWidgetLayout() {
return R.layout.[COLOR="Red"]clock_widget_analog[/COLOR];
}
@Override
public int getName() {
return R.string.[COLOR="Red"]app_name[/COLOR];
}
@Override
public int getWidth() {
return getCellWidth() * 5;
}
@Override
public int getHeight() {
return getCellHeight() * 5;
}
@Override
public int getPreviewUri() {
return R.drawable.[COLOR="Red"]watchface_analog_preview[/COLOR];
}
}
To:
Code:
package com.naheel.sw2.widget.example.analog.widgets;
import com.naheel.sw2.widget.example.analog.R;
/**
* This widget displays an analog clock providing resources which will be
* automatically rotated by the accessory firmware to reflect the time.
*/
public class AnalogClock2 extends SmartWatch2ClockWidget {
public AnalogClock2(WidgetBundle widgetBundle) {
super(widgetBundle);
}
@Override
int getWidgetLayout() {
return R.layout.[COLOR="Red"]clock_widget_analog_2[/COLOR];
}
@Override
public int getName() {
return R.string.[COLOR="Red"]name_2[/COLOR];
}
@Override
public int getWidth() {
return getCellWidth() * 5;
}
@Override
public int getHeight() {
return getCellHeight() * 5;
}
@Override
public int getPreviewUri() {
return R.drawable.[COLOR="Red"]watchface_analog_preview_2[/COLOR];
}
}
6-Edit "clock_widget_analog_2.xml" on res/layout from:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res/com.sonymobile.smartconnect.extension.testclock"
android:layout_width="215px"
android:layout_height="170px"
android:background="@android:color/transparent"
android:baselineAligned="false" >
<!-- We set a background on containing the base for a watch face. -->
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/[COLOR="Red"]watchface_bg[/COLOR]" />
<!-- Here we reference a TimeLayout using a single drawable for displaying
the hour hand. -->
<include layout="@layout/[COLOR="Red"]analog_clock_hand_hours_border[/COLOR]" />
<!-- Here we reference a TimeLayout using a single drawable for displaying
the minute hand. -->
<include layout="@layout/[COLOR="Red"]analog_clock_hand_minutes_border[/COLOR]" />
<!-- Here we reference a TimeLayout using a single drawable for displaying
the second hand. Note: Seconds will not be shown when the backlight is off
on the SmartWatch 2. -->
<include layout="@layout/[COLOR="Red"]analog_clock_hand_seconds[/COLOR]" />
</RelativeLayout>
To:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res/com.sonymobile.smartconnect.extension.testclock"
android:layout_width="215px"
android:layout_height="170px"
android:background="@android:color/transparent"
android:baselineAligned="false" >
<!-- We set a background on containing the base for a watch face. -->
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/[COLOR="Red"]watchface_bg_2[/COLOR]" />
<!-- Here we reference a TimeLayout using a single drawable for displaying
the hour hand. -->
<include layout="@layout/[COLOR="Red"]analog_clock_hand_hours_border_2[/COLOR]" />
<!-- Here we reference a TimeLayout using a single drawable for displaying
the minute hand. -->
<include layout="@layout/[COLOR="Red"]analog_clock_hand_minutes_border_2[/COLOR]" />
<!-- Here we reference a TimeLayout using a single drawable for displaying
the second hand. Note: Seconds will not be shown when the backlight is off
on the SmartWatch 2. -->
<include layout="@layout/[COLOR="Red"]analog_clock_hand_seconds_2[/COLOR]" />
</RelativeLayout>
7-Edit "analog_clock_hand_seconds_2.xml" from:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Use TimeLayout components to place TimeViews showing e.g. hours or minutes
when building up the UI. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
widgets:gravity="center" >
<!-- Defines a second hand using a drawable and setting the timeType to
seconds. The second hand will be automatically rotated by the accessory
firmware. Note: Seconds will not be shown when the backlight is off
on the SmartWatch 2. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/[COLOR="Red"]second_00[/COLOR]"
widgets:timeType="seconds" />
</com.sonyericsson.extras.liveware.aef.widget.TimeLayout>
To:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Use TimeLayout components to place TimeViews showing e.g. hours or minutes
when building up the UI. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
widgets:gravity="center" >
<!-- Defines a second hand using a drawable and setting the timeType to
seconds. The second hand will be automatically rotated by the accessory
firmware. Note: Seconds will not be shown when the backlight is off
on the SmartWatch 2. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/[COLOR="Red"]second_00_2[/COLOR]"
widgets:timeType="seconds" />
</com.sonyericsson.extras.liveware.aef.widget.TimeLayout>
8-Edit "analog_clock_hand_minutes_border_2.xml" from:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Use TimeLayout components to place TimeViews showing e.g. hours or minutes
when building up the UI. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
widgets:gravity="center" >
<!-- Defines a minute hand using a drawable and setting the timeType to
minutes. The minute hand will be automatically rotated by the accessory
firmware. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/[COLOR="Red"]minute_border_00[/COLOR]"
widgets:timeType="minutes" />
</com.sonyericsson.extras.liveware.aef.widget.TimeLayout>
To:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Use TimeLayout components to place TimeViews showing e.g. hours or minutes
when building up the UI. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
widgets:gravity="center" >
<!-- Defines a minute hand using a drawable and setting the timeType to
minutes. The minute hand will be automatically rotated by the accessory
firmware. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/[COLOR="Red"]minute_border_00_2[/COLOR]"
widgets:timeType="minutes" />
</com.sonyericsson.extras.liveware.aef.widget.TimeLayout>
9-Edit "analog_clock_hand_hours_border_2.xml" from:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Use TimeLayout components to place TimeViews showing e.g. hours or minutes
when building up the UI. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
widgets:gravity="center" >
<!-- Defines an hour hand using a drawable and setting the timeType to
hours_fine. The hour hand will be automatically rotated by the accessory
firmware. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/[COLOR="Red"]hour_border_00[/COLOR]"
widgets:timeType="hours_fine" />
</com.sonyericsson.extras.liveware.aef.widget.TimeLayout>
To:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Use TimeLayout components to place TimeViews showing e.g. hours or minutes
when building up the UI. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:widgets="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
widgets:gravity="center" >
<!-- Defines an hour hand using a drawable and setting the timeType to
hours_fine. The hour hand will be automatically rotated by the accessory
firmware. -->
<com.sonyericsson.extras.liveware.aef.widget.TimeView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/[COLOR="Red"]hour_border_00_2[/COLOR]"
widgets:timeType="hours_fine" />
</com.sonyericsson.extras.liveware.aef.widget.TimeLayout>
-----------------------------------------------------------------------------------------------------------------------
---Old thread---
-----------------------------------------------------------------------------------------------------------------------
Please do not take everything and say it's you'r own job. It's enough to say thanks to me on your app. There's something in this world called google removal
Click to expand...
Click to collapse
If you made a watch, post it here and I'll add it to the collection
Hello,
Thank you very much for your Tutorial. I got my own analog clock.
But is there any way to have a background for Digital Clock?
8-Edit "analog_clock_hand_minutes_border_2.xml" from
dont have analog_clock_hand_minutes_border_2.xml !
---------- Post added at 02:53 PM ---------- Previous post was at 02:47 PM ----------
my watch faces
Hi,
Is it still possible to create new watch faces for the SW2 these days? The main obstacle to start seems to be the inability to download the Sony Add-on SDK. I have only been able to find version 1.0 so far with much searching. Does anyone know where the version 3 file can be downloaded?
Thanks,
Lee
Hello,
I am wondering how to decompress the *.manifest files which can be found in the Windows\WinSxS folder.
Since Windows 8, those file are null-delta compressed. (cf. http://i1.blogs.technet.com/b/askco...ng-reduction-of-windows-footprint-part-2.aspx)
The Delta Compression APIs are explained on this page: https://msdn.microsoft.com/en-us/library/bb417345.aspx
Basically, the compression is relative to a source file: the compressed file is kind of a compressed diff. You need to have the original file and the compressed file (the delta).
But, you can also use it as a simple compressor without providing a source file (NULL).
I successfully made a small test program in C++ to compress/decompress a file using MSDelta API (CreateDelta, GetDelataInfo & ApplyDelta). The compressed file (the delta) starts with "PA30" bytes.
Unfortunately, the manifest files starts with "DCM\x01PA30" and if I try to use the GetDeltaInfo function on a manifest file, it fails. If I remove the "DCM\x01" bytes, the GetDeltaInfo function works but the ApplyDelta function fails with error 13 (Invalid data).
So, I found the DLL responsible for the manifest compression is "wcp.dll". Inside this DLL, 2 functions are interesting:
[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z
-> this one contains the "DCM\x01" string
[email protected]@[email protected]@[email protected]@[email protected][email protected]@@[email protected]@Z
Thanks to IDA Hex-rays, I can confirm these functions uses the MSDelta APIs for sure. But I'm a bit lost when I try to find out what differs from a basic compression.
Is someone talented enough in RE to help me find out?
Thanks
try lzmsexpand from Alex Ionescu:
https://twitter.com/aionescu/status/597520706876801024
MagicAndre1981 said:
try lzmsexpand from Alex Ionescu:
https://twitter.com/aionescu/status/597520706876801024
Click to expand...
Click to collapse
Thanks. It was not exactly the right tool (even if I may need it at some point) but thanks to you I found the right tool:
http://forums.mydigitallife.info/th...ty-SxS-Package-Extractor-(Updated-2013-09-30)
http://forums.mydigitallife.info/threads/48613-Aunty-Mel-s-Cheap-And-Nasty-SxS-File-Expander
Just dropping in to say i wrote a working tool for this task
You can find it here: https://github.com/smx-smx/wcpex
Code:
$ ./wcpex.exe amd64_avc.inf_31bf3856ad364e35_10.0.15063.0_none_bd6d26a0caecd0e5.manifest
Size: 349
Type is 4
InitializeDeltaCompressor: 0x00000000
LoadFirstResourceLanguageAgnostic: 0x00000000
==> Dictionary
>6A230000 00000000 6A230000 00000000< j#......j#...... zX
>A090CC9A F87F0000< ........ zX
DeltaDecompressBuffer: 0x00000000
==> Out Blob
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v3" manifestVersion="1.0" copyright="Copyright (c) Microsoft Corporation. All Rights Reserved.">
<assemblyIdentity name="avc.inf" version="10.0.15063.0" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" type="driverUpdate" />
<dependency discoverable="no" resourceType="Resources">
<dependentAssembly dependencyType="prerequisite">
<assemblyIdentity name="avc.inf.Resources" version="10.0.15063.0" processorArchitecture="amd64" language="*" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />
</dependentAssembly>
</dependency>
<file name="avc.inf" sourceName="avc.inf" importPath="$(build.nttree)\driver_infs\">
<infFile xmlns="urn:schemas-microsoft-com:asm.v3" />
<asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>yWTFi0fUQfXTtMUaxUpUiaO+HxxSBrmdNsqbzrssmcg=</dsig:DigestValue>
</asmv2:hash>
</file>
<file name="avc.sys" sourceName="avc.sys" importPath="$(build.nttree)\">
<signatureInfo>
<signatureDescriptor DRMLevel="1300" />
</signatureInfo>
<asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>qqYc6rf3aSzmaAkhgEu+5iZZq6TliVhqK5SRGx2ahqg=</dsig:DigestValue>
</asmv2:hash>
</file>
<file name="avcstrm.sys" sourceName="avcstrm.sys" importPath="$(build.nttree)\">
<asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>k8NVRLU9Ch+8vDFl2lQZsnfUWCyjWPxFvq5YPCRB/hY=</dsig:DigestValue>
</asmv2:hash>
</file>
<deployment xmlns="urn:schemas-microsoft-com:asm.v3" />
</assembly>