summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue #4279860: previous UI flashes before showing lock screen...Dianne Hackborn2011-08-231-0/+4
| | | | | | | | | | ...(when turning display on after recently turning it off) Also clean up when we decide to turn the screen on to improve that transition. There are still problems here with turning it on before the wallpaper gets dispayed. Change-Id: I2bc56c12e5ad75a1ce5a0546f43a845bf0823e66
* LayoutLib: add native delegate for set/getHinting in Paint.Xavier Ducrohet2011-08-221-0/+25
| | | | Change-Id: I1758f8ce861240d72113aa23dcbef5a52abade56
* Make some methods/fields package private so that layoutlib can access them.Xavier Ducrohet2011-08-1128-139/+324
| | | | Change-Id: I4aeadfbaf8a4f6a459fa19937c21ac23d9e5fb64
* Implement native println_native in android.util.Log for LayoutLibPhilip Milne2011-08-092-0/+52
| | | | Change-Id: I2ab83a131468490cf789bf17f9c12b6360e953a4
* Fix bug 5011824 - New Holo overflow menu for physical menu key devicesAdam Powell2011-08-071-0/+6
| | | | | | | | The new Holo-style overflow menu now appears from the edge of the screen where the device's physical menu key can be found. The policy determining this lives in getPreferredOptionsPanelGravity() in WindowManagerService. Change-Id: I8851a2265547156591e82044e50b5cfc58d3eefa
* Layoutlib: implement Resources.getBoolean(int).Xavier Ducrohet2011-08-031-0/+16
| | | | Change-Id: I44cee203bb9a8fabaebfd689fc20ec2f2a9b3561
* Layoutlib: simple comment fix.Xavier Ducrohet2011-08-021-2/+2
| | | | Change-Id: I402f6b465706e8edd14e512a973d087a14abbfe3
* Misc layoutlib fix in preparation of the access change in framework code.Xavier Ducrohet2011-08-017-54/+28
| | | | Change-Id: I873adb7345514be6daa5c4fea4ebabb515f203e2
* Report the external display size to the input reader.Jeff Brown2011-07-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The input reader needs this information so that it knows how to interpolate touches on an external touch screen. Changed Display so that it asks the WindowManager what the real display size is (as opposed to the raw display size). This means it now takes into the forced display size set by adb shell am display-size. Replaced all calls to getRealWidth() / getRealHeight() / getRealMetrics() in the WindowManager and replaced them with direct usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM doesn't end up making a reentrant Binder call into itself. Fixed the table status bar HeightReceiver so that it updates the height on all configuration changes since it is possible that the display size changed independently of an external HDMI display being plugged / unplugged. Improved the Display class documentation to make the distinctions betweeen the various sizes clearer. Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
* am ed07215e: am 55775e5f: am e70b2b8f: am 9bcf26ea: Merge "Layoutlib_create ↵Xavier Ducrohet2011-07-253-13/+30
|\ | | | | | | | | | | | | flag -p: don\'t change all accesses to public." * commit 'ed07215e482cae1ffedbba707284821b3afc310f': Layoutlib_create flag -p: don't change all accesses to public.
| * am 55775e5f: am e70b2b8f: am 9bcf26ea: Merge "Layoutlib_create flag -p: ↵Xavier Ducrohet2011-07-253-13/+30
| |\ | | | | | | | | | | | | | | | | | | don\'t change all accesses to public." * commit '55775e5f34af8d7c22ab3212c253b3a7d34a6f8a': Layoutlib_create flag -p: don't change all accesses to public.
| | * am e70b2b8f: am 9bcf26ea: Merge "Layoutlib_create flag -p: don\'t change all ↵Xavier Ducrohet2011-07-213-13/+30
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | accesses to public." * commit 'e70b2b8fe0c265171f3a367a66c99b36c62567c7': Layoutlib_create flag -p: don't change all accesses to public.
| | | * am 9bcf26ea: Merge "Layoutlib_create flag -p: don\'t change all accesses to ↵Xavier Ducrohet2011-07-213-13/+30
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | public." * commit '9bcf26ea7aa108ce4bf4e973b4774d3e60eebafe': Layoutlib_create flag -p: don't change all accesses to public.
| | | | * Layoutlib_create flag -p: don't change all accesses to public.Raphael Moll2011-07-193-13/+30
| | | | | | | | | | | | | | | | | | | | Change-Id: Icb1709ed0cb275a5a51ca34030695a5e94091499
| | * | | am 4d825e1f: Merge "Bring in more layout lib changes from hc-mr1." into ↵Xavier Ducrohet2011-06-2812-192/+322
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gingerbread * commit '4d825e1f3bb6b52ecbea6f0c4aa2081b7f1edc89': Bring in more layout lib changes from hc-mr1.
| | | * | | Bring in more layout lib changes from hc-mr1.Xavier Ducrohet2011-06-1612-192/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fe051bb2 : Change the way the layoutlib instantiate its XmlPullParser. A lot of the init code was duplicated so I made a ParserFactory class. Also created an extension of the KXmlPullParser to override toString(). This allows easier debugging when dealing with multiple parsers (which is always the case). Also added some (disabled) debugging printf to deal with parser stack as it can be tricky figuring out which parsers are in the stack at which point. 8969147c : Fix case where the int[] attrs doesn't directly match a styleable. In the case of the FastScroller the int[] is a custom mix of attr instead of a int[] that exists as R.styleable.foo. This makes our reflection based mechanism used to find the styleable fail, so instead we search for each attribute separately (like we probably should have done from the beginning). 0c264b35: Fix various cases of getDimension to report error if unit is missing. if getDimention###() is called for a string that has no unit, then an error is output through LayoutLog, but the rendering keeps going by using dp as a default. 0beb7eea: Make (Bridge)TypedArray.getInteger() call out to getInt() Only getInt() resolved attribute flags/enum and I'm not sure why there's two to begin with. Change-Id: I015111263d2a2bee76834978ae71eef79defdae3
| | * | | | am 4753498d: Merge "CherryPick 06942bc4 from hc-mr1. do not merge." into ↵Xavier Ducrohet2011-06-282-4/+9
| | |\ \ \ \ | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gingerbread * commit '4753498d5c1ac3cf93b0730e77946a95b6913a82': CherryPick 06942bc4 from hc-mr1. do not merge.
| | | * | | CherryPick 06942bc4 from hc-mr1. do not merge.Xavier Ducrohet2011-06-162-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layoutlib - use the new getParser callback when possible. Change-Id: I72b867aa573fcc07d610f139da3c90b1b654633c
| | * | | | am 9918ffb0: Merge "CherryPick 988eeeb5 from hc-mr1. do not merge." into ↵Xavier Ducrohet2011-06-283-16/+49
| | |\ \ \ \ | | | |/ / / | | | | / / | | | |/ / | | |/| | | | | | | | | | | | gingerbread * commit '9918ffb07f47430e22f6e53576d59b599f5a3534': CherryPick 988eeeb5 from hc-mr1. do not merge.
| | | * | CherryPick 988eeeb5 from hc-mr1. do not merge.Xavier Ducrohet2011-06-163-16/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for custom declare-styleable attr with enum/flag in layoutlib. Change-Id: I8a5b7cc629d61996ffade9aabd9d4d10961eb411
* | | | | Layoutlib: misc fix + start of AndroidBidi support.Xavier Ducrohet2011-07-195-27/+57
| | | | | | | | | | | | | | | | | | | | Change-Id: If2ce0b683da8cce01679322d503eed8dd474e521
* | | | | Enable IMEs to set additional subtypes in backgroundsatok2011-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4591792 Change-Id: I7e61a576c56d1a3a56001bdf2fd51ad3801add01
* | | | | am 9163a4a6: am aa4b1d8b: am d292d2a0: Merge 36a3a392 from mr1.Xavier Ducrohet2011-07-131-0/+60
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '9163a4a686fc25fefc77d5b41c24a4538486a48e': Merge 36a3a392 from mr1.
| * | | | am aa4b1d8b: am d292d2a0: Merge 36a3a392 from mr1.Xavier Ducrohet2011-07-111-0/+60
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit 'aa4b1d8ba9d5e317b67638b764d92d17fb810aa0': Merge 36a3a392 from mr1.
| | * | | | Merge 36a3a392 from mr1.Xavier Ducrohet2011-07-111-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Protect against OOB index in BridgeTypedArray. Change-Id: I40be1e039f9eb36c182b6522bd50d6ed98e15b5c
* | | | | | LayoutLib: updated fake accessbility manager and ensure there's an ↵Xavier Ducrohet2011-07-125-0/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InputMethodManager We had replaced the accessibility Manager but it lacked some new API. Obvisouly this is fragile and should be fixed, but this works for now. After fixing this there was another issue with the lack of InputMethodManager. To fix this I had to create an implementation of IInputMethodManager which normally comes from a binder object. I may want to do a similar trick with the accessibility manager later. Change-Id: I28c6494e333f39072f348d0199124efac93256a5
* | | | | | LayoutLib: Delegate for Display and IWindowManager implementation.Xavier Ducrohet2011-07-126-20/+639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows ViewConfiguration to be properly implemented which is now required for the rendering to happen. Change-Id: I55629689fa8f5f874b43fcac2aa0789ce02d58f4
* | | | | | new button graphics for layoutlib.Xavier Ducrohet2011-07-119-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I12a6bf9df87552321452ca3344449814cd3102bb
* | | | | | am f9705ef6: am 2b5f2d01: am e2b41b0d: Merge "Laoutlib_creator: keep ↵Raphael Moll2011-06-238-117/+319
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | original of delegate methods." * commit 'f9705ef6d3f1502991dd312bfdbfb93cb07fe672': Laoutlib_creator: keep original of delegate methods.
| * | | | | am 2b5f2d01: am e2b41b0d: Merge "Laoutlib_creator: keep original of delegate ↵Raphael Moll2011-06-228-117/+319
| |\ \ \ \ \ | | |/ / / / | |/| / / / | | |/ / / | | | | | | | | | | | | | | | methods." * commit '2b5f2d01558ba338042f486c754f63873c4061fe': Laoutlib_creator: keep original of delegate methods.
| | * | | am e2b41b0d: Merge "Laoutlib_creator: keep original of delegate methods."Raphael Moll2011-06-228-117/+319
| | |\ \ \ | | | |/ / | | |/| / | | | |/ | | | | * commit 'e2b41b0d5c8db85a60cd190c7094052db61114b2': Laoutlib_creator: keep original of delegate methods.
| | | * Laoutlib_creator: keep original of delegate methods.Raphael Moll2011-06-178-117/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For specific methods, Layoublib_create can rewrite the implementation of a method to invoke a delegate instead of the original code. This allows layoutlib to implement native code or override existing behavior. This patch also 'saves' the original implementation of a rewritten method so that the delegate can access the original implementation as needed. Obviously this is only done for non-native methods. Given a non-native SomeClass.MethodName, we generate 2 methods: - A copy of the original method named "SomeClass.MethodName_original". The content is the original method as-is from the reader. - A brand new implementation of SomeClass.MethodName which calls to a non-existing method named "SomeClass_delegate.MethodName". The implementation of this 'delegate' method is done in layoutlib_brigde. Change-Id: I5ca2cd3ac55991a8e8a51c417e75ee447bf9e9e6
| | * | Cherrypick d1ed33c4 from hc-mr1. do not merge.Xavier Ducrohet2011-06-033-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix zombie threads in the Layoutlib. Some widgets can create (indirectly) HandlerThread which are started but never stopped. This patch use the delegate methods to override the thread run method to record which threads are started to be able to call quit() on them after a render. Note that we should really fix layoutlib_create to be able to call the default implementation from a delegate to remove code duplication. Change-Id: Iaf5432623e9704bb3114a8e0583c8553282c205e
| | * | Cherrypick 5b61ea6b from hc-mr1Xavier Ducrohet2011-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix drawCircle in layoutlib. Change-Id: I035c48b925cad246ed821e9e59a93d37174982ef
| | * | LayoutLib: enable the LAYOUT_ONLY capability.Xavier Ducrohet2011-06-021-1/+1
| | | | | | | | | | | | | | | | Change-Id: Ib302af47d2a83a7ac3def6256bf0b892823f594f
| | * | Merge dba35f1b from honeycomb-mr1. do not merge.Xavier Ducrohet2011-06-017-16/+13
| | | | | | | | | | | | | | | | | | | | Change-Id: Iebda5ea67fd40cac76a8ca3fe3c3cd4ee95ddebe LayoutLib: Properly configure KXmlParser to read UTF8
| | * | Merge 6103e22c from honeycomb-mr1. do not merge.Xavier Ducrohet2011-05-241-53/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LayoutLib: custom styles override the default style instead of replacing it. Intead of reading either the custom or the default style for a widget, we read both and use the values from the custom style if it exists, or from the default style otherwise. Change-Id: Ibcec2e9b1e8a95295ab26ede145c287ff2f30be4
| | * | Merge 2402ad60 from honeycomb-mr1. do not merge.Xavier Ducrohet2011-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | LayoutLib: Fix Canvas_Delegate.native_concat(). Change-Id: I863c43d65a929816ac7c9e69addcc647dac1878b
| | * | Merge e57aa434 from honeycomb-mr1. do not merge.Xavier Ducrohet2011-05-203-32/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LayoutLib: Fix issue where <include> with no layout params wouldn't display. The issue is that the layout params from the root element of the included layout should be used but this failed because loading the layout params from the <include> tag didn't throw a RuntimeException in our modified code (BridgeTypedArray). Because we don't want to throw exception in general we only throw it when reading the layout params of an include node which is pretty crappy, but works for now. Change-Id: I83ccf956e8b476f34dfc9a70aebae2288d53746e
| | * | Merge 05b7b69c from honeycomb-mr1. do not merge.Xavier Ducrohet2011-05-193-22/+33
| | | | | | | | | | | | | | | | | | | | Change-Id: I1aca5774dec2e18ab5f9e860f6fd90b481b2857c LayoutLib: support the new baseline/margin query API.
| | * | Merge 2fae858d from Honeycomb-mr1. do not merge.Xavier Ducrohet2011-05-1911-51/+799
| | |/ | | | | | | | | | | | | Change-Id: I648f9ffa9745331ce4104dc4772f78ed933a4909 LayoutLib: implement data binding for most AdapterView
| | * LayoutLib: don't render when shader's local matrix is set to 0 scale.Xavier Ducrohet2011-04-062-18/+35
| | | | | | | | | | | | Change-Id: I7726d87f3dd0475ac662f535a08c6435b8b9ed1f
| | * Merge c5aeac7f from honeycomb.Xavier Ducrohet2011-04-061-23/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LayoutLib: Fix issue with rendering mode. When the layout content is embedded inside a decor layout to emulate system bar (top or bottom) and title bar (or action bar) then the code computing the full required size based on the RenderingMode would fail because the decor layout would prevents the content layout to take as much room as possible. There is also an issue with the way we know render dialogs as the dialogs usually as a frame with some padding and the previous measurements would not take into account the dialog padding when increasing the screen size. This fix makes the code measure the size of the content layout in the normal rendering, and then separately from the root layout with the proper MeasureSpec to let the content grown. The difference in size is then added to the screen size. Bug: http://code.google.com/p/android/issues/detail?id=15892 Change-Id: Ie9a6c5e254b16785f817dcb9fae755d4936880aa
| | * Merge 67450db0 from honeycomb. Do not merge.Xavier Ducrohet2011-03-171-11/+4
| | | | | | | | | | | | | | | Change-Id: I0ca140dd6d9279ff313f930739ad40fbbed4f335 LayoutLib: TypedArray.getDimensionPixelSize can actually return <0
| | * Merge 9d76581f from honeycomb. do not merge.Xavier Ducrohet2011-03-152-30/+52
| | | | | | | | | | | | | | | | | | | | | | | | LayoutLib: Fix Arc rendering. Looks like Java2D and Skia go in different directions for angles. Change-Id: I4d72db56455afe25b4f51f23a9b29d6c438119ba
| | * Merge adaa12cd from honeycomb. do not merge.Xavier Ducrohet2011-03-153-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LayoutLib: fix Capabilities and getDimensionPixelSize Commented out a Capability that is not in ADT 10. BridgeTypedArray.getDimensionPixelSize shouldn't call getDimension since most of the code is duplicated, and it prevents use from properly detecting malformed attribute values. Change-Id: I008334af605a89f240247a13c0024009247ec5af
| | * Merge 6f2fb570 from honeycomb. do not merge.Xavier Ducrohet2011-03-142-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | LayoutLib: Fix dimension parsing to handle negative value. Also make TypedArray.getDimensionPixelSize properly handle negative values (which are not allowed). Change-Id: I03ffcef5ab7ec7ef95419566776dcc798845fd88
| | * Merge c12b4093 from honeycomb. do not merge.Xavier Ducrohet2011-03-141-25/+80
| | | | | | | | | | | | | | | Change-Id: Icfbb70c097d87bf92415c6f0534346adde4c02fe LayoutLib: Implement some missing add###() method in Path.
| | * Merge 1911a6f7 into gingerbread. do not merge.Xavier Ducrohet2011-02-2512-66/+67
| | | | | | | | | | | | | | | Change-Id: I6d56644c4ab1a70eb4a6d0d2e5d84ea4aa674041 LayoutLib: move tests to their own project.
| | * LayoutLib: Adapt the HC layoutlib to GB. do not merge.Xavier Ducrohet2011-02-2340-1422/+296
| | | | | | | | | | | | Change-Id: I0b2016987a65fabbc0ce7011514543349e9fb929