Saturday, June 4, 2011

Learn Cards is over 5000 downloads!


Remember the date 04.06.2011 :)
Today is the day! Lean Cards application was downloaded for the 5000th time.

And i am proud to present you the Android Market Statistics:

It's been a long 5 month for the app to get there.

After I will finish working on the new and better version of Brick Tower game, I will add few more features to Learn Cards:

*Enable the Move To SD option

*Unlock the Import feature in the free version.

*Add in app billing to remove ADS.

Tnank you all for downloading :)

Saturday, May 7, 2011

C++ College OOP Project


Hey, today I want to share my last project with you, which is a home work for my OOP class in college.


The task was to show our teacher (Vladimir Nodelman)  that we understand the basics of OOP, which includes classes, inheritance and polymorphism. We were asked to come up with a subject for the task and I decided to implement a paint-like application with a couple of minor enhancements, like editing, dragging and removing of the already placed shapes.

For UI we were asked to use WINAPI library that we covered last semester.


I started with creating a base class for a shape and a number of derived classes, like rectangle, which inherits to rectangle_fill (colored rectangle), and a button that I created myself, so i could draw an icon in it.

To accomplish the polymorphism I created a shape list, which contains Pointers to all shapes.
Important: for the polymorphism to work you need to created the function you want to call with the base class as virtual functions and to call them through base class pointer.

In the base class I created a couple of virtual functions, like draw(HDC) which gets the device context and draws on it.
WINAPI event handling is used to catch events of Left Mouse Button Pressed/Released, Mouse Movement, Window Creation and more. Each event is handled accordingly.






Enjoy.


Snapshot:


Code                 Exe

Saturday, April 16, 2011

Brick Tower Beta


Brick Tower game is inspired by a video game I saw in the mall.
The idea of the game is to create a brick tower that will reach the top of the screen.
To make it more interesting I've added some new bricks types; hitting a skeleton brick will end the game while hitting a smiley brick will grant a bonus.
It will remain a Beta version till I'll get new ideas for new stages (it has only 6 stages for now).
If you have any ideas for new stages or any other thoughts about how to improve it, you're welcome to contact me at: evgeni.shafran@gmail.com





Tuesday, March 8, 2011

Volume Control

Volume Control. 
I made this one mostly for personal usage. After one year of using my device, the volume controls (the + - on the side) of my desire starts to stuck, and sometimes do not work at all. So when i listen to music on the device and want to change the volume i need to go to Home -> Settings .... and it really annoying as some song are louder then other, and i need to do this change often.
The program i created gives you only the option to change the Volume, that is it :) it also have an notification option so you can launch it from the notification bar.

Pro version:
Free version


free version pro version

Monday, March 7, 2011

Learn Cards Update

Learn Cards 0.9.7 the free version


  • Volume controls now changing Media volume in the main screens
  • Added ads to the game screens
  • Opened the import option (up to 4 elements)

Thursday, January 13, 2011

Android screen size problem

When I started working on the Learn Cards application, one of the major problems I’d bumped into, was trying to get the exact window size of my layout.
The problem is that each Android method I tried returns the phone physical resolution (480-800 on my HTC Desire), but this 800 pix height also includes the android icons bar (the one with the clock and the battery icon) and the program tile bar (in my case a plain Learn Cards text).
When I presented a grid of images (2*3) and set their size so they fill the screen (height/3 and width/2), they exceeded the screen limits (for obvious reasons: wrong height calculation).
The only useful advice I found on the net was to override the onMeasure method (stackoverflow post), but it was tricky to implement in my project, as I don't have any custom views. I tried to create my own Layout, then override the onMeasure method and create the grid there and it actually worked on my Desire. However, when I tested this solution on HTC Wildfire, it calculated the size correctly, but didn't draw the grid (I still haven’t figured why).
The solution that worked for me was to calculate the height once at the application start via overriding the linerlayout, and then using this value in the rest of my project.
Here is a small example that implements the solution described above: (Sample code available for download Here )




First we need to create our LayoutMessure, which overrides the LinearLayout class:






        public class LayoutMessure extends LinearLayout




Then override the onMeasure method and save the needed values values for a future use:






        static public int windowW=0;
static public int windowH=0 ;
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) 
{
// we overriding onMeasure because this is where the application gets its right size.
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
windowW = getMeasuredWidth();
windowH = getMeasuredHeight();
}






Now we need to add our new custom LayoutMessure to our main screen:
Add this code right after the first layout:






        <view
         class="il.yavji.screensize.LayoutMessure"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:id="@+id/customlayout"
         android:gravity="center"
        >




And close it right before you close the first (main) layout:



        </view>


Now each time the main screen is created, our custom class will measure the screen size and you will be able to get it later through LayoutMessure.windowW and LayoutMessure.windowH properties.




One last thing - this solution will work for all application screens except the first one, because the onMessure called only after  onCreate finished.
If you intend to use it on main screen too, just add another dummy screen that does nothing except for calling the main screen, and add the view to it. 

Tuesday, January 11, 2011

Pro version is on Market, and upgrade to the simple version released

Eventually i found some time to finish the work on the pro version!
Its available now on market.
The pro version has the import capability and you can download some theme samples from the blog to test it out.

Also in the simple release i added a reward puzzle screen, and improved the main menu.