Monday, 1 April 2013

Sunday, 31 March 2013

android: View Html and JavaScript in WebView


WebView htmlWebView = (WebView) findViewById(R.id.webView1);     

try {
     htmlWebView.getSettings().setPluginState(PluginState.ON);
   //presentationWebView.getSettings().setPluginsEnabled(true);
     htmlWebView.getSettings().setJavaScriptEnabled(true);
     htmlWebView.getSettings().setLoadWithOverviewMode(true);
     htmlWebView.getSettings().setAllowFileAccess(true);      
     htmlWebView.loadUrl("file:///android_asset/htmldatat/index.html");  
     htmlWebView.setWebViewClient(new WebViewClient(){
              @Override                public boolean shouldOverrideUrlLoading(WebView view, String url)      

             {
                return false;
                    }
           });
    htmlWebView.getSettings().setBuiltInZoomControls(true);                         

} catch (Exception e) {
     e.printStackTrace();
}

Thursday, 21 March 2013

Android ems

It is the width of the letter M in a given english font size. So 2em is twice the width of the letter M in this given font. In font differ from english it is the width of the widest letter in this font, this width is different size in pixels then the width size of the M in the english font but it is still 1em. So if I use text with 12sp in english font 1em is relative to this 12sp english font, using Italian font with 12sp gives 1em that is differ in pixels width then the english one.

Monday, 18 March 2013

error: Error parsing XML: unbound prefix

Put this line in the root view group


xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"

Tuesday, 4 December 2012

Update Table from other DB table

use TV_Guide
update Countries
set  country_FlagIcoLinkEncryptionInfo= d.couFlagIcoLinkEncryptionInfo

from DishesOnline.dbo.Countries d
where country_NameEn = d.couNameEn

Sunday, 25 November 2012

the setup routines for the sql server odbc driver could not be found

error "the setup routines for the sql server odbc driver could not be found. please reinstall the driver"

error: "data source name not found and no default driver specified"

The Magic solution is 
windows start>run>regsvr32 odbcconf.dll

everything will be OK In sha' Allah

Tuesday, 6 November 2012

Install android Market on android emulator


  1. Create Android Emulator on android 4.1 or greater, assume its name is "Android_JellyBean"
  2. Copy the android tools uri and past it at the end of the environment path key
  3. start the command prompt 
  4. type emulator -avd Android_JellyBeans -partition-size 400 -no-audio -no-boot-anim
  5. wait while the emulator start 
  6. type the following in command prompt 
        adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
        adb shell chmod 777 /system/app

     7. Download GoogleLoginService.apk 
                         GoogleServicesFramework.apk
                         Vending.apk 
      8.  Run eclipse and open DDMS and open file explorer, go to system folder open it, and open app 
           folder, and push the downloaded files respectively
      9.  Type adb shell rm /system/app/SdkSetup* in the command prompt 
     10. Create android fake account and enjoy