A quick one here, I was working on a late project and got this weird bug. Tested my android app on 4.2 working all fine but suddenly it crashed on everything below it. Here's the code cause the error
See the problem here is that according to Android Dev, the Async Task MUST run in the UI thread. But the Timer is having it's own seperate thread. So, with the help of Stackoverflow :D I managed a solution where the Timer contains a Handler which would be running in the UI thread. Modified code
You wont believe that I spent 1.30 hours on this
Just because i wanted to do some simple animations, like sliding/swiping when a listview of mine is updated :|
If you ever wanted to do something like, pushing list items downwards when adding a new items or pulling the rest of the layout upwards when visibility of some widget changes
just DONT, DO NOT write your own custom animations. Just add the simple property to your activity layout xml file :D yeaah that is all you have to do
Kinda strange to crash with something totally new to the blog but wth :D. Okay some background first, I recently had to go FULL time ubuntu [not by choice], but because i screwed up my Windows partition. Any how after much more blaaaaas , i wanted to develop C#, VB and ASP stuff for .net framework 4 in UBUNTU.
Strange things i know, but believe me a lot of ppl want to do those. So just like everyone else i searched google, Mono was promising and installed it. [ubuntu 11.10].
When i started Mono, I was really impressed, hell they almost ported VS2010 to ubuntu, the C# features worked great but got dissapointed when i came to the VB.NET section.
When i try to compile the VB.NET code, i get 1 error and 8 warning
8 warnings : the Assemblies not available for some bla
cannot find the import GTK
1 error : Cannot find the 'Windo' class
So there i was searching the internet again and again
Solutions that i found on internet but did not work for me
1) Changing the project type for VS2008 from VS2008 Goto Edit->Preferences->Load/Save
Select VisualStudio 2008 from the dropdown
And recreate a VB.NET project
Well some said it worked but not for me :/
2) Changing the .Net framewrok type
Double click the Porject from Solution Explorer Build -> General
Runtime Version : Mono / .Net 2.0
Again did not work for me.
And I noticed that the references of the project are all marked red, unlike when i opened a C# project, so after some seriously wasting for time i finally found this.
1) Double click References. You get Edit references dialog
2) Goto .Net Assembly tab
3) Now we are going to add all the DLL files added as references already [but not working] manually again
4) Goto /usr/lib/mono/gac [this is where all the assemblies are]
5) First we'll add the atk-sharp library
a reference will be added
6) Repeat the above for other references as well
I was soo tired just searching about this, believe me I literally read all posts on stackoverflow regarding those keywords
What I wanna do?