specifying widget parameter - Android Q&A, Help & Troubleshooting

The code below is from a backup of Total Launcher (my personal favorite).
Apparently there will be one instance of similar code for each widget defined on each launcher page.
As you can see, this example is for Zooper widget. But each Zooper widget use can have a different "skin".
SO, how is this "skin" specified in the below code? It seems that the parameter "i":715 would have something to do with it, but I don't know what the parameter means. Some sort of index maybe?
Other parameters are easily deduced like T , L, W and H for top, left, width and height.
This seems to be a somewhat normal android paradigm; I've seen references to lots of other widgets (not Zooper) and most utilize the "i" parameter.
I have added two ZW's to a page in TL and set each to a different "skin". The lines below will be added twice to the parameter file with ONLY the "I" parameter different.
Anyone??
Boowho??
{"w":360,"aw":360,"b":[{"T":3,"p":"org.zooper.zwpro\/org.zooper.zwlib.provider.WidgetProvider4x4","i":707,"X":-2.5,"Y":-41,"W":360,"H":360},{"T":3,"p":"com.xwidgetsoft.xwidget\/.appwidget.XWidgetMain4x4","i":715,"X":-2,"Y":195,"W":360,"H":418.5}]}

Related

[REF][ADV] The B&N Home Screen Internals

The B&N Home application lets you add B&N-purchased books to the home screen and arrange/resize them arguably better than most generic android launchers. Unfortunately this doesn't work for sideloaded books. This is most definitely not because it can't be done, but likely as an incentive for you to purchase books from B&N and not sideload. The following describes the sqlite3 database entries necessary to manually add sideloaded books (and potentially other things) to this home screen.
Warning: Changes should not be attempted by someone not at least somewhat familiar with adb and sqlite3. This is not intended as a how-to for adding sideloaded books to the home screen (since it is tedious, and not something you'd likely do often manually), but more as a reference for someone to perhaps develop an android app for the NC to do so on-device. If you don't use the B&N Home at all and use the device more as a tablet than an e-reader, you can completely ignore this post.
Relevant databases:
/data/data/com.bn.nook.home/files/home.db - Contains the home screen 'workspace' table with entries for each item on the home screen.
/data/data/com.bn.nook.reader.activities/databases/lastreadingpoint.db - Contains the 'lastreadingpoint' table which records the last read position for all books (B&N and sideloaded).
/data/data/com.android.providers.media/databases/internal.db - Android 'media' provider database containing content entries for books (among other things). Heavily modified by B&N.
home.db, workspace table
Schema:
Code:
CREATE TABLE workspace (_id TEXT PRIMARY KEY, thumbnail_url TEXT, cover_image_url TEXT, ean TEXT, title TEXT, author TEXT, desktop_num INT NOT NULL, left INT NOT NULL, top INT NOT NULL, right INT NOT NULL, bottom INT NOT NULL, rotate_degree FLOAT NOT NULL, lending_state INT NOT NULL, is_lendable BOOLEAN NOT NULL, is_recommended BOOLEAN NOT NULL, is_new BOOLEAN NOT NULL, is_sample BOOLEAN NOT NULL, launcher_type TEXT, product_type INT NOT NULL, product_ean TEXT, is_hidden BOOLEAN NOT NULL DEFAULT FALSE, path_to_file TEXT);
Fields:
_id - Android content link to the book.
Examples: content://media/internal/products/1 (B&N book), content://media/internal/docs/1 (sideloaded book)
thumbnail_url - Thumbnail image location. Note that sideloaded use non-browser paths. File:// paths do not appear to work in this field.
Examples: http: //images.bn.com/images/85750000/85751898.JPG (B&N Book), /media/.docThumbs/Quick_Startepub.jpg (sideloaded book)
cover_image_url - Cover image location. Same format as thumbnail. Same image even, for sideloaded books.
Examples: http ://images.bn.com/images/85750000/85754280.JPG (B&N Book), /media/.docThumbs/Quick_Startepub.jpg (sideloaded book)
ean - B&N unique identifier, for B&N Books. File location in browser format (file:///media/...) for sideloaded books. Note this must match what's in lastreadingpoint.db for the last reading point to be correct when tapping the book to open it.
Examples: 9781402786402 (B&N Book), file:///system/media/books/Quick_Start.epub (sideloaded book)
title, author - Self explanitory. Plain text. Appear to be unused unless the images are not found, in which case the title is truncated and overlaid on a generic gray icon.
desktop_num - Which desktop the icon appears on. 0,1, or 2 with 1 being the default.
left, top, right, bottom - Pixel measurements for the corners of the icons. Determines the location and size of the icon on the home screen.
rotate_degree - Haven't played with this one yet.
lending_state - Current state of lendable book. Haven't investigated valid values other than the default 0.
is_lendable, is_recommended, is_new, is_sample - Flags that determine what 'banner' is displayed, and also what opens show on tap-and-hold.
launcher_type - Launcher to open the book with.
Valid values: blank (epub), epub, epib (children's books). Things still to try: html, pdf...
product_type - Type of book.
1 = B&N book, 0 = Sideloaded book.
product_ean - Appears to always match ean field.
is_hidden - Hide's icon? Haven't tried.
path_to_file - Filesystem path to book.
Examples: /media/B&N Downloads/Books/9781402786402_ePib.v2.epub (B&N Book), /system/media/books/QuickStart.epub (sideloaded book)
lastreadingpoint.db, lastreadingpoint table
Schema:
Code:
CREATE TABLE lastreadingpoint (_id integer primary key autoincrement, ean text , luid text , offsetrmsdk text , lastupdated long , bookdna int , sync_status int);
Relevant Field:
ean - B&N unique identifier, for B&N Books. File location in browser format (file:///media/...)for sideloaded books. Note this must match what's in home.db for the last reading point to be correct when tapping the book to open it.
internal.db, products/docs tables
Schema:
Code:
CREATE TABLE products (_id INTEGER PRIMARY KEY,ean TEXT NOT NULL UNIQUE,_data TEXT,_size INTEGER,product_type INTEGER NOT NULL,mime_type TEXT,_display_name TEXT,product_code TEXT NOT NULL,format_code TEXT NOT NULL,purchase_status TEXT NOT NULL,title TEXT NOT NULL,authors TEXT NOT NULL,mainAuthorFirstName TEXT,mainAuthorMiddleName TEXT DEFAULT NULL,mainAuthorLastName TEXT NOT NULL,publisher TEXT NOT NULL,date_published INTEGER NOT NULL,date_added INTEGER NOT NULL,date_modified INTEGER,date_last_accessed INTEGER DEFAULT 0,thumb_image TEXT,cover_image TEXT,rating INTEGER DEFAULT 0, user_rating INTEGER DEFAULT 0, subscription_ean TEXT DEFAULT NULL,isSubscription BOOLEAN DEFAULT 0,isSample BOOLEAN DEFAULT 0,locker_delivery_id INTEGER NOT NULL,locker_status TEXT NOT NULL, short_synopsis TEXT,storage_location INTEGER DEFAULT 1,isNew INTEGER DEFAULT 0,lendable BOOLEAN DEFAULT 0,lending_state TEXT,lendee TEXT,lender TEXT,lend_message TEXT,lend_id TEXT,lend_offer_expires INTEGER,lend_starts INTEGER,lend_ends INTEGER,category TEXT,luid TEXT NOT NULL,sync_status INTEGER DEFAULT 0,page_count INTEGER,rating_count INTEGER, local_thumb_image TEXT, local_cover_image TEXT, ebook_key TEXT, launcher_type TEXT, isDownloadable INTEGER DEFAULT 1, productEAN TEXT, isComingSoon INTEGER, DeliveryFrequency INTEGER, seriesTitle TEXT, soldBy TEXT, trialExpirationDate INTEGER );
Code:
CREATE TABLE docs (_id INTEGER PRIMARY KEY,ean TEXT,_data TEXT,_size INTEGER,product_type INTEGER,mime_type TEXT,_display_name TEXT,title TEXT,authors TEXT,mainAuthorFirstName TEXT,mainAuthorMiddleName TEXT DEFAULT NULL,mainAuthorLastName TEXT,publisher TEXT,date_added INTEGER,date_modified INTEGER,date_published INTEGER,date_last_accessed INTEGER DEFAULT 0,valid INTEGER,thumb_image TEXT,cover_image TEXT,rating INTEGER DEFAULT 0, user_rating INTEGER DEFAULT 0,storage_location INTEGER DEFAULT 0,category TEXT,page_count INTEGER, launcher_type TEXT, volume_id INTEGER DEFAULT 0);
Relevant Fields:
_id - The content id needed for the _id field in home.db workbook table.
thumb_image - Thumbnail image location. Note that sideloaded use non-browser paths. File:// paths do not appear to work in this field.
Examples: http ://images.bn.com/images/85750000/85751898.JPG (B&N Book), /media/.docThumbs/Quick_Startepub.jpg (sideloaded book)
cover_image - Cover image location. Same format as thumbnail. Same image even, for sideloaded books.
Steps to add sideloaded content via adb:
Pull all relevant tables from the device using adb.
Look up relevant database entries (content id, images, etc)
Use sqlite3 to add or modify entries in home.db, workspace table.
Example:
Code:
INSERT INTO workspace VALUES('content://media/internal/docs/3', '/media/.docThumbs/TestBook.jpeg', '/media/.docThumbs/TestBook.jpeg', 'file:///media/My Files/Books/TestBook.epub', 'Test Book', 'Test Author', 1, 20, 20, 184, 232, 0.0, 0, 0, 0, 0, 0, 'epub', 0, 'file:///media/My Files/Books/TestBook.epub', 0, '/media/My Files/Books/TestBook.epub');
Push home.db back to the NC.
Kill the Home process via shell or a process manager app.
Open Home again.
Notes:
12/29/10
Sideloaded books must be opened at least once to populate all the databases. This poses a potential problem for trying to do this at sideload time, ie through a calibre plugin.
The _id field of workspace does not appear to have to be correct for icons to function normally. My first tests had a generic 'test1' in that field until I figured out where to look for the correct value and I was able to open sideloaded books just fine with the resulting icon. This fact, along with the fact that image locations can be guessed correctly may mean we can do this at sideload time after all.
The User Guide and Quick Start are decent examples of sideloaded content on the B&N Home screen. The only oddities with them are blank ean fields, so last read position is not used when opening them.
I've seen some oddities where the icons don't render images until you touch one of them on the screen after the Home app launches. Haven't tracked down the cause yet, and it doesn't happen every time.
Setting a sideloaded book as lendable adds the 'Lend' option to the tap-and-hold, but it doesn't appear to do anything after you enter the contact. My guess is they verify this status either with their servers (likely), or with another on-device database (doubtful) .
Sideloaded books can be removed from the home screen as normal, by doing a tap-and-hold and choosing Remove.
very nice work
I can't help anyway with this but I'm glad someone's trying to fix this problem.
Wow, nice work! I'm hoping someone with more experience than me can write this into an app.
I actually really like the BN home screen, so maybe for I'll give this a try for my textbooks. I'll need them all semester, so it would probably be worth it.
Addendum: I wonder if it would be possible to make this process easier my first adding the books and the relevant thumbnails to the home screen via the process described here and then editing the database entry to remove the is_sample tag.
im gonna give this a try, but moreso, im gonna look at ADWLauncher, to see if i can add this to that launcher
Maybe I was too tired, but in my poking around (and your post) I didn't see anything about the "shelves" feature in the schema for these db. You have any ideas?
usernotfound said:
Maybe I was too tired, but in my poking around (and your post) I didn't see anything about the "shelves" feature in the schema for these db. You have any ideas?
Click to expand...
Click to collapse
Shelves are more a feature of the Library app than the Home app, so I haven't investigated them. There are tables in internal.db having to do with shelves, so I would look there first, as well as /data/data/com.bn.nook.library.
How about launching books
Any idea on how to launch a book with the B&N software? I would assume there is some kinda intents that could be used if documented to do that.
Would be nice for say a replacement home app to be able to launch books..
I've been able to (manually) create shortcuts in adw launcher to launch books using the B&N reader (as well as a few others like Aldiko, etc.). The intent (column in the adw db) that seemed to work for the B&N reader looked something like this:
Code:
file:///media/My Files/Books/Some-Book-Filename.epub#Intent;action=android.intent.action.VIEW;component=com.bn.nook.reader.activities/.ReaderActivity;end
One thing the BN Home does is initialize open-book-icon in the status bar ... to point to the 'currently reading' book. This icon doesn't work if an alternate launcher is set to default upon boot.
I'd love to get that currently-reading icon to work in alternate launchers, but I'm not sure where to begin. Any thoughts?
WhiskeySlx said:
I'd love to get that currently-reading icon to work in alternate launchers, but I'm not sure where to begin. Any thoughts?
Click to expand...
Click to collapse
This is unlikely to be trivial. As far as I can tell that icon is updated as long as the B&N home app is running in the background, even if you don't ever open it again. This likely means there is some communication between the B&N reader app and the home app to update the icon. Getting the reader app to somehow communicate with another app or launcher would almost certainly require decompiling and modifying it.
[mods, please move this to a new thread if this is too OT]
Rayven01 said:
Getting the reader app to somehow communicate with another app or launcher would almost certainly require decompiling and modifying it.
Click to expand...
Click to collapse
I wonder if the Nook reader app might expose an 'action' that matches that button's functionality. I'm thinking about how, using ADW, you can create custom shortcuts... and under "Activities", ADW lists activities for each app... for example:
- Gmail.ComposeActivity
- Market.UninstallActivity
- com.google.android.maps.PlacesActivity​
I don't know what method it uses to build that list, but... maybe it's a direction to pursue?

[Q] Android Drawing: Using invalidateViews Method vs. Automatic

Basically what I want to know is what is the impetus for Android to redraw views.
If I change a resource like the image resource in an ImageView that has already been drawn the ImageView will be redrawn. But it seems I can't just change or add a view in something like GridView. Instead I have to use the adapter and I need to use invalidateView() for the view for the GridView be redrawn.
Why are ViewGroups like GridView designed in a way that make it use a different mechanism in the code to be redrawn? Why is the ImageView automatically redrawing, but they way the made GridView is that it has to have a method called to get redrawn?
Also just generally, what is ultimately causing the views to redrawn.

[Q] How to get a reference to the stock launcher activity object?

I want to read out the shortcuts' and widgets' position and name on the screens of the launcher. Since every launcher is different, I will focus on the stock launcher of Android for the moment. I have not found an API to do this, so I am trying my luck with Java's Reflection API. So far I have been able to get the class and read out the type of the variable holding the items on the desktop called mDesktopItems. But to read out the variable's content, I need a reference to the launcher activity object. It's obvious that this object does not have to exist, but I can probably check regularly and once it does, I would fetch the data.
So how do I get a reference to the launcher activity object? Or could you think of a better way of fetching the required data?

Better than equalsIgnoreCase?

I am trying to make this application in which user needs to type in keyword. I would like to make it so that if user inputs, for example "lessons", string, with name "lessons list" would still appear, because we are talking about lessons. Maybe you have any tips, or maybe there are any android api's functions that would look not for the ideal match of strings, but for relatively close match of strings.
Thanks.
str1.contains(str2) is all you need (str1 is your string to compare, and str2 is your keyword).
Note that uppercase and lowercase characters aren't the same, so you should match them: str1.toLowerCase().contains(str2.toLowerCase()).

[TUTORIAL] Create APK watchfaces with or without coding skills - Project GreatFit

DOCUMENTATION: Project GreatFit
{
"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"
}
IntroductionThis project scopes to provide an easy way to create Amazfit APK watchfaces even without coding skills!
On the other hand, the provided code is clear (still working on this ), contains many comments and is at "the state of the art" when it comes to Amazfit APK watchfaces development.
This code refers to both designers and programmers so feel free to skip the parts about developers.
THIS TUTORIAL IS DEPRECATED WITH THE NEW SOURCES. Most parameters are now gathered in one file: GreatFit\app\src\main\res\values\arrays.xml, read that file, it's quite easy to make changes now. I haven't been able to update the tutorial since I improve GreatFit and its connection with Amazmod.​
FeaturesWhy to use these APK watchface sources and not an *.wfz file or other sources? Because:
Customize hours and minutes separate
Display custom battery/steps/daily steps progress bars
Display custom battery/weather icons
Display date/month/day separate
Display more weather info (humidity, wind direction and strength, UV status, city)
Display next watch alarm
Display air pressure
Show/hide units (for calories, distance, temperature)
Easy to enable/disable elements
Easy to position elements in the screen (same positions for screen on and off modes!)
Easy to set element colors
Preparation:
With or without coding skills, you will have to download and install Android Studio in order to compile the java sources to an APK.
Additionally, you will need to download the sources from here.
Project's Structure:Run Android studio, click file->open and select the sources folder. In Studio's left column you will now see project's structure.
View attachment 4559933
You only have to edit 3 things to make a watchface:
Watchface's parameters (elements' positions in the screen and other features)
Images
Fonts
For developers
To start with, you can add more watchfaces in the same APK by editing the manifest and creating 2 new java classes identical to GreatFit and GreatFitSltp.
Within each of these classes you will be able to load each watchface's widgets. There are currently 8 widgets:
- MainClock, where all the time and date elements are handled
- Circle widget, where battery (as number), calories, steps and distance elements alongside with the progress circles/bars are handled.
- Heart rate widget
- Battery widget, that handles the battery images
- Floor widget
- Weather widget, where the weather magic happens
- Great widget, where I try to make new elements work (like am/pm, next alarm and Xdrip)
Watchface's parameters:There are 5 files containing watchface's parameters inside "app\src\main\res\values":
bool.xml (Show/hide: elements, units, progressbars, icons & set the text aligment center or left for each element)
colors.xml (Show/hide: elements, units, progressbars, icons & set the text aligment center or left for each element)
dimens.xml (Change elements' positions in the screen and their font size)
integer.xml (Change progressbars angles and their screen off color, and define the font_ratio)
strings.xml (Change watchface name & style author)
bool.xml:
You can show or hide an element by turning the value to "true" or "false". Additionally you can enable or disable the "flashing_indicator" (the : between hours and minutes) or the "flashing_heart_rate_icon" which will show or hide the "flashing_heart.png" image every second.
Examle, turn seconds off:
Code:
//The original line with the seconds is:
<bool name="seconds">false</bool>
//And seconds are shown by turning the false to true
<bool name="seconds">true</bool>
Additionally with enabling or disabling element, in this file you would set text alignment for each element. Currently, only left and center alignmet types are supported.
Examle, detting steps' alignment:
Code:
//To align the text left:
<bool name="steps_left_align">true</bool>
//To align the text in the center:
<bool name="steps_left_align">false</bool>
colors.xml:
- Under construction
dimens.xml:
- Under construction
integer.xml:
- Under construction
strings.xml:
- Under construction​
Fonts:All the used fonts are located in "app\src\main\assets\fonts" folder. Currently you are unable to use more than one font without changing the java code. To change the font, just replace the "font.ttf" file with your font (keep the same name, both .OTR and .TTF files will work).
Causion: If you change the font, you will have to change the "font_ratio" parameter inside the "app\src\main\res\values\integer.xml" file. This parameter shows the position of font's vertical center (from the top in percent of its height). We need this value in order to calculate the same positions for both screen on and off modes (don't ask why ).
Sooo... we need "y" in terms of height%. To calculate it you can just see if the texts moves between screen on/off. Raise or decrease "font_ratio" until you find the perfect spot
If you want to know more about this...
When screen is on, vertical positions are based on the vertical center of the font. On the other hand, when screen is off, texts are like images thus the positions are based on the top left corner of the font. However, i have found a way to calculate horizontal and vertical centers. For more take a look at each widget's slpt code...
For developers
To add more fonts in your code, edit the "app\src\main\java\com\dinodevs\greatfitwatchface\resource\ResourceManager.java" file. Then you have to change these code for every element you whant to change to a second font:
Code:
//Screen on: in the init function, Screen off: in the buildSlptViewComponent function
ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.FONT_FILE)
Images:When screen is on:
All "screen on" images are gathered in the "res" folder (this is the default images directory on android projects). These images can be in any rgb color.
When screen is off (slpt mode):
On the other hand, all "screen off" images are gathered in the "assets" folder. These images must have a specific color pallete consist of 8 colors:
#ffffff
#ffff00
#ff00ff
#ff0000
#00ffff
#00ff00
#0000ff
#000000
Here is the pallete i use in gimp: View attachment amazfit_palette.zip (css exported pallete, unzip it and import it).
If you don't convert the screen off images in this pallete, at best the image would be converted automatically or they will not show up at all.
I will explain all the images included in this project in the next update. To be continued...​
Awesome job, man! Very well documented too, thanks a lot!
I am waiting for daily distance based on steps (like in Mi Fit). I would like to see this function
Awesome...i was waiting for this..thanks man..
jugglerpl said:
I am waiting for daily distance based on steps
Click to expand...
Click to collapse
I suppose this will require you to input your height in order to be more precise... Maybe I can search for an average value for now
i was waiting for this..thanks
What changes did u make in the .jar lib?
Hi,
As I am new to this. Please help me to find out the changes that u made in the .jar file to make it work. I also want to know that how u narrowed down these changes in the .jar file.
Thansk,
Vivek
Nice tutorial(for your first one) .
How do I change the hour digit size;
Is it easy to add more widgets?
In the OP photo i can see at least 3 more widgets
vivek3507 said:
Hi,
As I am new to this. Please help me to find out the changes that u made in the .jar file to make it work. I also want to know that how u narrowed down these changes in the .jar file.
Click to expand...
Click to collapse
Smali editing is not so easy. If you use an older jar file you don't need to make any changes in it.
vd69 said:
Nice tutorial(for your first one) .
How do I change the hour digit size;
Is it easy to add more widgets?
In the OP photo i can see at least 3 more widgets
Click to expand...
Click to collapse
This tutorial is deprecated with the newer sources. Most parameters are now gathered in one file: GreatFit\app\src\main\res\values\arrays.xml
Read that file, it is quite easy to change things now
GreatApo said:
Smali editing is not so easy. If you use an older jar file you don't need to make any changes in it.
This tutorial is deprecated with the newer sources. Most parameters are now gathered in one file: GreatFit\app\src\main\res\values\arrays.xml
Read that file, it is quite easy to change things now
Click to expand...
Click to collapse
I made some changes concernig hour digit size and widget font sizes .Then i pressed build apk and tryed to install it after unnistalling previous version with huami tool (like i do with every version of Greatfit.apk) .Every time the result was failure .
vd69 said:
I made some changes concernig hour digit size and widget font sizes .Then i pressed build apk and tryed to install it after unnistalling previous version with huami tool (like i do with every version of Greatfit.apk) .Every time the result was failure .
Click to expand...
Click to collapse
Unfortunately you have to uninstall with ADB. For some reason various programs do not completely install the apps.
GreatApo said:
Unfortunately you have to uninstall with ADB. For some reason various programs do not completely install the apps.
Click to expand...
Click to collapse
I did it.Thank you so much
Is there a way to see virtually the changes in android studio before applying it
vd69 said:
Is there a way to see virtually the changes in android studio before applying it
Click to expand...
Click to collapse
Unfortunately no. The only thing you can do is setup a layout with the parameters but I have never done it.
Just install it from ADB directly, the watchface will just refresh,l. Next time, just press the up arrow in console and Enter...
GreatApo said:
Unfortunately no. The only thing you can do is setup a layout with the parameters but I have never done it.
Just install it from ADB directly, the watchface will just refresh,l. Next time, just press the up arrow in console and Enter...
Click to expand...
Click to collapse
Thanks
In arrays where the widgets are is written "add a widget here and in widget list". Widget list its before the widgets.? If so, what are the numbers written in every widget 2,12 and so on?
vd69 said:
In arrays where the widgets are is written "add a widget here and in widget list". Widget list its before the widgets.? If so, what are the numbers written in every widget 2,12 and so on?
Click to expand...
Click to collapse
Just copy the previous widget (ex. widget 5) and paste it directly under it. Then add one more element in the "widgets" array (the numbers you are saying). Those numbers are the order number of the default widget you place there (calories, steps etc). You can see them in the "supported widgets" array.
So, lets say you want to add one more widget, which by default floor is selected. You copy the 5th widget, you paste it under 5th, rename it to 6th ("widget6"), change the positions etc. Then you have to add it in the widgets array, make a new item under "<item>22</item>" and input floors' order number which is 6.
Let me know if you got it
GreatApo said:
Just copy the previous widget (ex. widget 5) and paste it directly under it. Then add one more element in the "widgets" array (the numbers you are saying). Those numbers are the order number of the default widget you place there (calories, steps etc). You can see them in the "supported widgets" array.
So, lets say you want to add one more widget, which by default floor is selected. You copy the 5th widget, you paste it under 5th, rename it to 6th ("widget6"), change the positions etc. Then you have to add it in the widgets array, make a new item under "22" and input floors' order number which is 6.
Let me know if you got it
Click to expand...
Click to collapse
Thanks. I will try when I return from work tonight or tomorrow morning. If I put 0 or 25 is by default none?
vd69 said:
Thanks. I will try when I return from work tonight or tomorrow morning. If I put 0 or 25 is by default none?
Click to expand...
Click to collapse
0 is the first widget type (I think it is steps or calories, because array index starts from 0), 25 is the none if I remember correctly.
GreatApo said:
0 is the first widget type (I think it is steps or calories, because array index starts from 0), 25 is the none if I remember correctly.
Click to expand...
Click to collapse
OK i think I got it. Ευχαριστώ. I don't want to be annoying and I know you are a busy man,did you have time to look about the fishing widget?

Categories

Resources