Saturday, February 22, 2014
Friday, February 21, 2014
Thursday, February 20, 2014
Wednesday, February 19, 2014
Android - How to apply color filter over ImageView component (link)
http://stackoverflow.com/questions/8193447/i-want-to-add-a-color-filter-to-the-imageview
If you want to use your predefined colours get them this way e.g. :
v.setColorFilter(getResources().getColor(R.color.green), PorterDuff.Mode.SRC_ATOP);
Thursday, February 13, 2014
Tuesday, February 11, 2014
Android - How to force use of overflow menu on devices with menu button
http://stackoverflow.com/questions/9286822/how-to-force-use-of-overflow-menu-on-devices-with-menu-button
try {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
if(menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
} catch (Exception ex) {
// Ignore
}
Java primitives types size chart
Below in the chart the size (in bytes) of primitive type goes next to its name.
1 byte
2 short
4 int
8 long
8 double
4 float
2 char
1 boolean
The way to highlite grid's selected rows in GXT v2
public void colorLockedGridRows() {
Grid grid = gridView.getGrid();
ListStore<BeanModel> store = grid.getStore();
for (BeanModel model : store.getModels()) {
SecurityGroupVO bean = model.getBean();
if ( bean.isLocked() ) {
Element row = grid.getView().getRow(model);
row.addClassName("locked-row-background-color");
}
}
}
Grid grid = gridView.getGrid();
ListStore<BeanModel> store = grid.getStore();
for (BeanModel model : store.getModels()) {
SecurityGroupVO bean = model.getBean();
if ( bean.isLocked() ) {
Element row = grid.getView().getRow(model);
row.addClassName("locked-row-background-color");
}
}
}
Wednesday, February 5, 2014
Saturday, February 1, 2014
LINUX UBUNTU 12.04 64-bit and Android SDK 32-bit issue - gradle: Cannot run program sdk build-tools android-4.4 aapt No such file or directory
If you got this kind of error during the building of Android app: Execution failed for task mergeDebugResources Cannot run program sdk build-tools android-4.4 aapt No such file or directory -- this happen because you run Android SDK 32-bit on Linux Ubuntu 12.04 64-bit.
You can fix it easily by installing this libraries:
http://askubuntu.com/questions/147400/problems-with-eclipse-and-android-sdk
http://stackoverflow.com/questions/18928164/android-studio-cannot-find-aapt
You can fix it easily by installing this libraries:
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
More about this issue here:http://askubuntu.com/questions/147400/problems-with-eclipse-and-android-sdk
http://stackoverflow.com/questions/18928164/android-studio-cannot-find-aapt
Subscribe to:
Posts (Atom)