2013년 3월 28일 목요일

fit webpage to webview

webView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);

2013년 3월 26일 화요일

specified child already has parent

this is incorrect:

ImageView imageView = new ImageView(this);

for(int i=0; i<5; i++) {
imageView.setPadding(10, 10, 10, 10);
layoutParams.setMargins(10, 10, 10, 10);
layoutParams.gravity = Gravity.TOP;
   imageView.setBackgroundColor(Color.BLUE);
container.addView(imageView, layoutParams);
}






this is correct:


for(int i=0; i<5; i++) {
ImageView imageView = new ImageView(this);
imageView.setPadding(10, 10, 10, 10);
layoutParams.setMargins(10, 10, 10, 10);
layoutParams.gravity = Gravity.TOP;
    imageView.setBackgroundColor(Color.BLUE);
container.addView(imageView, layoutParams);
}

2013년 3월 24일 일요일

NO USB Debugging Mode in 4.2 ?

Open Settings, then go to phone details (where u can see kernel, Android-version etc) then just tap your Build number "JOP40C" 7 times !

2013년 3월 19일 화요일

convert android project to aspectj project

click right button of mouse on android project name in package explorer. Then choose "Configure" and then "convert to aspectj project".

2013년 3월 11일 월요일

how to get key hash for facebook sdk in Ubuntu

type the following command on terminal.



keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 


password is android.

2013년 3월 10일 일요일

2013년 3월 8일 금요일

delete folder not empty in ubuntu

rm -rf <insert folder name here>/

how to make eclipse icon on launcher on Ubuntu 12.04 with android adt bundle


How to install Eclipse 4.2 on Ubuntu 12.04
Because Eclipse packages in Ubuntu are out of date. If we want to install last releases we are going to do it manually. You can just download the tar.gz file from eclipse.org.
1) Download Eclipse. I got eclipse-jee-juno-SR1-linux-gtk.tar.gz
2) Extract it by executing a command line
tar -xzf eclipse-jee-juno-SR1-linux-gtk.tar.gz
Or with Archive Manager extraction.
3) Move extracted eclipse folder to /opt/ folder
mv eclipse /opt/
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
4) Create an eclipse executable in your user path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
Create a file named eclipse in /usr/bin/ with your preferred editor (nanogeditvi...)
Copy this into it
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*
And save the file
5) Create a Gnome menu item
Create a file named eclipse.desktop in /usr/share/applications/ with your preferred editor (nano,geditvi...)
Copy this into it
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
And save the file
6) Launch Eclipse
/opt/eclipse/eclipse -clean &
7) Now you can Lock Eclipse to the launcher bar by clicking right button on Lock to Laucher

Uncaught TypeError: Object [object Object] has no method

http://stackoverflow.com/questions/14031635/android-4-2-1-webview-and-javascript-interface-breaks