The resolution can be changed by editing the BlueStack's registry:
HKLM\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0\Height
and
HKLM\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0\Width
Friday, January 4, 2013
Thursday, November 15, 2012
Side notes on Android Dev
- To make your subclassed ViewPager (android.support.v4.view.ViewPager) work, prepare both the constructors in your class:
- ViewPager(Context context)
- ViewPager(Context context, AttributeSet attrs)
- In ActionBarSherlock, if you can't get the loading icon work, i.e. setSupportProgressBarIndeterminateVisibility( ) just got no effect at all, then you are very likely have a wrong Window class (android.view.Window) imported. You should include the ActionBarSherlock Window class instead.
- com.actionbarsherlock.view.Window
Friday, September 21, 2012
Activity com.android.internal.app.ChooserActivity has leaked IntentReceiver error
If you ever come up with the error using ChooserActivity with the Android emulator, you probably don't need to be worried.
It's basically because you only have a single choice to start the intent (e.g. send a message, choose a audio file, choose a picture, etc., in the emulator).
There is just no way to show you the option dialog, and the exception raised. Read the explanation in the following:
http://stackoverflow.com/questions/11308260/chooser-activity-leak-android
It's basically because you only have a single choice to start the intent (e.g. send a message, choose a audio file, choose a picture, etc., in the emulator).
There is just no way to show you the option dialog, and the exception raised. Read the explanation in the following:
http://stackoverflow.com/questions/11308260/chooser-activity-leak-android
Tuesday, September 18, 2012
Android 2.2 SDK with strings.xml having multiple %s
When building the SearchableDictionary examples using 2.2 SDK, the strings.xml contains the following which fails the compilation:
<plurals name="search_results">
<item quantity="one">%d result for \"%s\": </item>
<item quantity="other">%d results for \"%s\": </item>
</plurals>
We need to change them to the following in order make it compiled:
<plurals name="search_results">
<item quantity="one">%1$d result for \"%2$s\": </item>
<item quantity="other">%1$d results for \"%2$s\": </item>
</plurals>
Reference:
Wednesday, September 12, 2012
Quick notes on Dojo 1.8
Just a quick notes on dojo 1.8. For example, if I want to use the Color object in dojo. I will:
var Color;
require(["dojo/_base/Color"], function(c) {
Color = c;
});
Then I can use the variable Color after the initialization is done. Am I correct? Should it be used in another way? :-)
var Color;
require(["dojo/_base/Color"], function(c) {
Color = c;
});
Then I can use the variable Color after the initialization is done. Am I correct? Should it be used in another way? :-)
Thursday, August 30, 2012
Upgrading from ArcGIS Android API v1.1 to v2.0
If you got a ArcGIS Android Project using ArcGIS API v1.1 and switch to v2.0, you will have a runtime exception when you do a pan action in the map view.
FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: nativeSetAnimating
com.esri.android.map.MapSurface.nativeSetAnimating(Native Method)
...
To solve this problem, you need to:
FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: nativeSetAnimating
com.esri.android.map.MapSurface.nativeSetAnimating(Native Method)
...
To solve this problem, you need to:
- Create a new ArcGIS Android project using v2.0
- Copy the files "libs/armeabi/libGLMapCore.so" and "libs/armeabi-v7a/libGLMapCore.so" back to your original v1.0 project directory
Wednesday, August 29, 2012
DOJO: Tab ordering in TabContainer
The tabContainer.getChildren( ) method returns a list of tab widget (ContentPane) in the container using the following way:
dijit.findWidgets(tabContainer.containerNode)
However, if you did some drag and drop actions on the tab button list to rearrange the tab ordering, the tab sequence did not changed actually. To get a modified / correct ordered list, you may try to override the getChildren( ) method:
myTabContainer.getChildren = function() {
var list = this.tablist.getChildren();
var rsltList = [];
for (var idx=0; idx<list.length; idx++) {
rsltList.push(list[idx].tab);
}
return rsltList;
}
Noticed the underlined "tab" member variable in the code, you need to manually assign it when your tab page is created. Or you may find a way / method to get the Tab page object (ContentPane) via the Tab Button.
If you got any better method, please let me know :-)
dijit.findWidgets(tabContainer.containerNode)
However, if you did some drag and drop actions on the tab button list to rearrange the tab ordering, the tab sequence did not changed actually. To get a modified / correct ordered list, you may try to override the getChildren( ) method:
myTabContainer.getChildren = function() {
var list = this.tablist.getChildren();
var rsltList = [];
for (var idx=0; idx<list.length; idx++) {
rsltList.push(list[idx].tab);
}
return rsltList;
}
Noticed the underlined "tab" member variable in the code, you need to manually assign it when your tab page is created. Or you may find a way / method to get the Tab page object (ContentPane) via the Tab Button.
If you got any better method, please let me know :-)
Thursday, August 23, 2012
Monday, June 18, 2012
Overriding window.open( ) in Javascript
Sometimes you may want override the window.open( ) in Javascript. It's strange, but you really it occasionally. Here is how we can do it:
var open_ = window.open;
window.open = function(url, name, opts) {
return open_(url, name, opts);
}
Then you can add your own checking / modifications right before the window is opened.
Tuesday, June 12, 2012
ArcGIS JS: Move a graphic to top
To move a graphic in a ArcGIS JS GraphicsLayer to top:
g.getDojoShape().moveToFront();
But this may breaks the onClick event of the GraphicsLayer, beware.
Updated: in ArcGIS JS API version 3.8, use getShape( ) instead. ESRI... no more stupid naming please...
g.getDojoShape().moveToFront();
But this may breaks the onClick event of the GraphicsLayer, beware.
Updated: in ArcGIS JS API version 3.8, use getShape( ) instead. ESRI... no more stupid naming please...
Subscribe to:
Posts (Atom)
Upgrade nodejs in conda (from v18 to v26)
If your conda env is nodejs v18, doing a conda install nodejs=26 is likely to create a lot of conflict. Consider remove those conflicting p...
-
When Office2003 couldn't find file SKU011.CAB: regedit -> [HKEY_LOCAL_MACHINE] -> [SOFTWARE] -> [Microsoft] -> [Office] -...
-
The resolution can be changed by editing the BlueStack's registry: HKLM\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0\Height and ...
-
Suppose you got a file in Big5 containing some HKSCS characters (e.g. 深水埗, 赤鱲角, etc). When your environment (Ref: Charset.defaultCharset( ) ...