Welcome

how would you rate The Holy Qura'an - Arabic ver?

Monday, June 14, 2010

The Holy Qura'an

The Holy Quraan - Full Version



Upcoming Update 3

I received an email from brother "mohammed24" and he was asking me about the UI and telling me that many people are asking for upgrading its design. This is a message he included in his email from a user on ce4arab
===============
اولا الله يجزا المبرمج خير ووالديه على هالبرنامج الحلو
ثانيا انا قادم من اي فون ومازلت استخدم اي باد فاسمحو لي بهالملاحظة وياليت المبرمج يسمعها
البرنامج شكله مش ولابد
اذا قارنته بالبرامج اللي في الاندرويد هو قمه
لكن لو تقارنه ببرنامج مصحف المدينة اللي على الاي فون
فرق
فاتمنا من المبرمج الله يخليه لو يركز على الشكل شوي
والبرنامج له مستقبل قوي
خصوصا اللي يلاحظ سرعة تحديثه
اسف اذا كان تعليقي ازعلكم لكن والله ان هذا البرنامج مهم ياجماعة ماتتخيلون وش يسوي بغير المسلمين لما يشوفونه فلو كان شكله حلو + مجاني + تقييم عالي في الماركت = مسلمين جدد
تحياتي


Therefore, the upcoming update 3 will include an upgrade to all the pages, menu, and also the UI in general. A fix for the zoom and a couple more new features. Just stay tuned ;)



Update 2.2.0 - July 01,2010

Some people will have issues with some pages and that is due to a network error while running the app for the first time. So this update should solve that issue. Also, I might not have explained the Bookmark thing before, but if you hold your finger to a specific page you will receive a message asking to bookmark that specific page for a later time access. Whenever you run your app you could simply go to the menu and select "Read Bookmark" that will take you to your last page you bookmarked.


Update 2.1.0 - June 22,2010

New Features:
- zoom
- menu options, basically to read your bookmarks and read "About"

So what's new in this update? Well, first of all you can zoom in by a click on a page and return by one click by the zoomed image. Second, I added bookmarks as many requested, kinda hidden I know but I find it easier for me this way, code wise. A long click on an image will give you the option to bookmark the current page or not. To get to the bookmarked page all you need to do is just go to Menu and select "Read Book Mark."

Things I learned:
- Making Alert dialogs.
- Creating Menu Elements
- Using both setOnItemClickListener and setOnItemLongClickListener to zoom in and to create a bookmark.


==============
First of all, I have to admit that it took me a long time to finish this app. First time I finished it I tried to upload it to the market but due to the massive size (30M) of it I couldn't. So I had to find an alternative way to get it smaller and loadable.
So, since all Soras are images it would be more efficient to save them on the SD card and downloadable from a URL. Doing that totally forced me to make lots of changes in the app and that's what kept me long till I uploaded the full version.

Things I learned:
1. making directories on the SD card to hold images downloaded from a server.
2. making a progress bar to indicate the amount of data saved.
3. creating a gallery with a String data input array.
4. sorting a list of files.
5. giving permissions to the app

if you are having troubles downloading this app from the market, here it is :)

Thursday, June 3, 2010

The Holy Qura'an

================================================

Update June 09, 2010


OK, so yesterday I uploaded my demo for The Holy Quraan on Android Market. My idea in making my apps is to make is as straightforward and easy as I could, I call this method LEC (Life Experience Computerization). You open a book and you want to jump to a specific page and start reading. You don't read the intro and bio pages every time you open your book. So this is why I build my apps like that. "just saying this 'cause I got a comment about this from one friend :) you know who you are

So, lets start, getting my app to jump to a specific page was a bit challenging. I use a gallery to show all the pages. The main menu is connected to all this pages and that's why you could jump to a specific Sora from the main menu and still could flip to all the other pages from that page.
At this point, I will omit the zoom function as a friend suggested and will focus on making the full version available. Options menu will be added in the next update.

Challenges I faced:
1. Enlarging images in my gallery to fit the screen.
2. Zooming .. still not sure how handle it perfectly.
3. Connecting main menu to point to a page in the gallery

OK, how does the gallery work?
First, lets say you have Screen1.java has a list of buttons one of them is related to btn1 in your Screen1.xml then Screen1.java should look something like this
==========
...
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.Screen1);

...
Button A = (Button) findViewById(R.id.btn1);
A.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
Intent i = new Intent(Screen1.this, Screen2.class);
int Str = 1;
i.putExtra("PASS", Str);
startActivity(i);
}
});
========
Notice you are passing "PASS=1" to Screen2.java where you will establish your gallery. Screen2.java should look like this:
public class Screen2 extends Activity
{
//---the images to display---
Integer[] imageIDs = {
R.drawable.Img0, //0
R.drawable.bgrd1 //1
};
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.Screen2);
Gallery gallery = (Gallery) findViewById(R.id.gallery1);
gallery.setAdapter(new ImageAdapter(this));
...

public class ImageAdapter extends BaseAdapter
{
private Context context;
private int itemBackground;
public ImageAdapter(Context c)
{
context = c;
//---setting the style---
TypedArray a = obtainStyledAttributes(R.styleable.Gallery1);
itemBackground = a.getResourceId(
R.styleable.Gallery1_android_galleryItemBackground, 0);
a.recycle();
}
//---returns the number of images---
public int getCount() {
return imageIDs.length;
}
//---returns the ID of an item---
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
//---returns an ImageView view---
public View getView(int position, View convertView, ViewGroup parent) {

ImageView imageView = new ImageView(context);
imageView.setImageResource(imageIDs[position]);
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setLayoutParams(new Gallery.LayoutParams(150, 120));
imageView.setBackgroundResource(itemBackground);
return imageView;
}
}
====
Notice three things,
1. The array of images you want to show is placed at the beginning of your class
2. your layout here is Screen2.xml
3. you must add ImageAdapter

Also, Screen2.xml should include your [Gallery android:id="@id/gallery1"/]


So this is basically how you set up your gallery.




================================================

Zoom




This is my new attempt to build an android app. This one will be fully released on android 2.2 due to the fact that the size will be HUGE. Some of the functionalities are:
1. Flipping pages by scrolling right and left.
2. Zooming to the page by clicking on it.
3. A list for all Soras to select from.

hmmmm what else!!!
More details about my progress will be posted soon.