Monday, August 6, 2012
Moved To RTP
Android emulator installing Google APIs
Tried installing google APIs with the Android SDK manager and got permission denied message.
Run the Android SDK manager by right clicking on the context menu and it works.
reference
Tuesday, October 11, 2011
Android, Phonegap, Jquery Mobile and Eclipse
The following 2 references should get you started with Android, Phonegap, Jquery mobile.
- phonegap-android-eclipse-quickstart gives all the steps needed to run a phonegap application with Android and Eclipse. After building the first sample project follow closely the steps given for new project.
- UI Development using jQueryMobile gives steps to integrate Jquery mobile to the mix.
The 2nd example uses Phonegap version 0.9. Updating to the recent version of phonegap is easy. However an extra XML folder in phonegap res (as mentioned in the first reference) should also be copied!
In reference 2 the download code and the listing in the blog are different. The blog source HTML works.
Thursday, October 6, 2011
Jquery mobile, Xampp, Android and WP7.1
Downloaded Jquery Mobile RC1. Looks great. The demo files are great to look at for examples. Unfortunately it is little bit more complicated to get it working locally so that you can look at the source code.
For this go to the Github repo download the zip file. It is a daily build. For example the version I downloaded was jquery-jquery-mobile-1.0rc1-33-gda2352a.
I unzipped it and copied all the files and copied them to
C:\jqm2\docs\docs_rc1 folder.
In XAMPP to avoid conflicts with IIS I did the following changes in the httpd.conf file in C:\xampp\apache\conf:
- #Listen 80 to
Listen 8080 - #ServerName localhost:80
ServerName localhost:8080 - #DocumentRoot "C:/xampp/htdocs"
to DocumentRoot "C:\jqm2\docs"
The first 2 changes avoid a conflict with IIS which was in 80 port in my machine.
Then I am able to browse the demo files by staring XAMPP and looking at the following web page
http://localhost:8080/docs_rc1/
Tested on both Windows Phone 7 with SDK7.1 and Android emulators. Works great.
Remember to press F8 in Android emulator to get web access and instead of localhost you have to use 10.0.2.2 as given in references below.
Wednesday, August 3, 2011
Silverlight Interesting Links for PathListBox
I am in the process of preparing an article for Codeproject. I have used the following links to work with PathListBox, geometry etc. I thought I will share these links with others.
- Spirograph Shapes: WPF Bezier Shapes from Math Formulae
- Busy Dizzy Bee-sley Spirographic Animation in Expression Blend & Silverlight
- WPF: Carousel Control
- Geometries
- Silverlight PathListBox – Fading Unselected Items
- PathListBox – Scrolling to Selected Item
- cloning path geometry in silverlight
- Silverlight String-To-PathGeometry Converter
- Alex Golesh's Blog About Silverlight Development
- A Glass Orb Button in Silverlight
- Creating a carousel with the PathListBox
- An introduction to the PathListBox
- NET.2971 - XAML Path mini-language (Silverlight)
- 3D Spiral Image Rotation for MIX 09 Challenge
- Render Transform versus Layout TransformNamed Colors Viewer
- Popular Baby Names
- Creating a motion path with the PathListBox
Friday, June 17, 2011
Windows phone 7 data visualization chart
I have made interesting charts on Windows Phone 7 based on various blog posts on this topic.
David Anson has a series of posts in his blogs
For basic charts use this:
The interesting portion in Windows Phone 7 is to load the exact assemblies from this code.
To modify colors I used the following post
Also I have been able to rotate the labels on column chart X axis by using this post
Tuesday, June 14, 2011
Autocompletebox with long lists for windows phone 7
I recently was working with a list of American cities which has around 19000 cities in WP7 application. I wanted to use the autocompletebox which will be helpful to find a name fast. However, the autocompletebox was sluggish. Hence I created a list of lists. The lists where for each alphabet which reduced the list sizes to reasonable size. I also used LINQ to get the city name.
When I tested in WP7 I got all searches under 100 milliseconds and most of them around 2 to 30 milliseconds.
Another thing I found out is the autocompletebox does not like Pivot control. The selection list offsets to the top of the screen with the first selection completely masked!
See the reference below
http://www.jeff.wilcox.name/2011/03/acb-in-pivot/
The XAML and the code are given below. This also used the textbox substitution to make sure the initial display did not have the drop down of the autocompletebox as per this forum discussion which I initiated:
AutoCompleteBox initial value in Windows Phone 7
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Stretch">
<toolkit:AutoCompleteBox ItemsSource="{Binding}" x:Name="City_Name_TextBox" ValueMemberPath="CityName"
Width="370" Visibility="Collapsed" MinimumPopulateDelay="200" <toolkit:AutoCompleteBox.ItemTemplate>
<DataTemplate >
<StackPanel VerticalAlignment="Stretch" >
<TextBlock Text="{Binding CityName}" />
</StackPanel>
</DataTemplate>
</toolkit:AutoCompleteBox.ItemTemplate>
</toolkit:AutoCompleteBox>
<TextBox Width="300" x:Name="City_Name_TextBox_Init" Visibility="Visible" Text="Palo Alto" MouseLeftButtonDown="City_Name_TextBox_Init_MouseLeftButtonDown"></TextBox>
<Button x:Name="Go_Button" Width="100" Content="GO" Click="Go_Button_Click" ></Button>
</StackPanel>
private void City_Name_TextBox_Init_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
City_Name_TextBox_Init.Visibility = System.Windows.Visibility.Collapsed;
City_Name_TextBox.Visibility = System.Windows.Visibility.Visible;
City_Name_TextBox.Text = "";
City_Name_TextBox.Focus();
// City_Name_TextBox.Focus();
}
public void Load_City_Alpha()
{
string[] abclist = new[] { "a", "b", "c","d","e","f","g","h","i","j",
"k","l","m","n","o","p","q","r","s","t",
"u","v","w","x","y","z"};
int salphaselectormax=26;
DateTime dtstart = DateTime.Now ;
for ( int salphaselector = 0; salphaselector < salphaselectormax; salphaselector++)
{
string salpha = abclist[salphaselector];
city_list_abc.Add( (from n in citylist
where n.CityName.ToLower().StartsWith(salpha)
select n).ToList());
}
//List<string> testlistlength = new List<string>();
//for (int i = 0; i < 26; i++)
//{
// testlistlength.Add(abclist[i]+"--" + city_list_abc[i].Count.ToString());
//}
DateTime dtend = DateTime.Now;
int dtduration = (dtend - dtstart).Milliseconds;
}
private void City_Name_TextBox_Populating(object sender, PopulatingEventArgs e)
{
// Allow us to wait for the response
DateTime dtstart = DateTime.Now;
e.Cancel = true;
//only query web service if more than 3 chars
if (City_Name_TextBox.Text.Length >= 3)
{
// Create a request for suggestion
int listindex = Array.IndexOf(abclist, City_Name_TextBox.Text.ToLower().Substring(0,1));
List<City> results = (from n in (Application.Current as App).city_list_abc[listindex]
where n.CityName.ToLower().StartsWith(City_Name_TextBox.Text.ToLower())
select n).ToList();
City_Name_TextBox.ItemsSource = results;
City_Name_TextBox.PopulateComplete();
}
DateTime dtend = DateTime.Now;
int dtduration = (dtend - dtstart).Milliseconds;
Timer_TextBox.Text = dtduration.ToString();
}