Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a list of basic prayers

  • Loading branch information...
commit c2183e7d560bfc861f08e660db1d2ba25811854e 1 parent 16f8203
Mahmoud authored
View
2  How to pray/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//src/com/example/how/to/pray/PrayersListActivty.java=UTF-8
View
4 How to pray/AndroidManifest.xml
@@ -11,9 +11,13 @@
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
+
<activity
android:name=".StartActivty"
android:label="@string/title_activity_start_activty" >
+
+ </activity>
+ <activity android:name=".PrayersListActivty">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
View
4 How to pray/bin/AndroidManifest.xml
@@ -11,9 +11,13 @@
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
+
<activity
android:name=".StartActivty"
android:label="@string/title_activity_start_activty" >
+
+ </activity>
+ <activity android:name=".PrayersListActivty">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
View
BIN  How to pray/bin/How to pray.apk
Binary file not shown
View
BIN  How to pray/bin/classes.dex
Binary file not shown
View
BIN  How to pray/bin/classes/com/example/how/to/pray/PrayersListActivty.class
Binary file not shown
View
BIN  How to pray/bin/res/drawable-hdpi/lars.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  How to pray/bin/resources.ap_
Binary file not shown
View
6 How to pray/gen/com/example/how/to/pray/R.java
@@ -18,12 +18,16 @@
public static final class drawable {
public static final int ic_action_search=0x7f020000;
public static final int ic_launcher=0x7f020001;
+ public static final int lars=0x7f020002;
}
public static final class id {
- public static final int menu_settings=0x7f080000;
+ public static final int icon=0x7f080000;
+ public static final int label=0x7f080001;
+ public static final int menu_settings=0x7f080002;
}
public static final class layout {
public static final int activity_start_activty=0x7f030000;
+ public static final int prayer_list=0x7f030001;
}
public static final class menu {
public static final int activity_start_activty=0x7f070000;
View
BIN  How to pray/res/drawable-hdpi/lars.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
28 How to pray/res/layout/prayer_list.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+
+
+
+
+
+
+
+
+
+
+
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="80dp"
+ android:layout_height="match_parent"
+ android:layout_margin="5px"
+ android:src="@drawable/lars" >
+
+ </ImageView>
+
+
+
+
View
33 How to pray/src/com/example/how/to/pray/PrayersListActivty.java
@@ -0,0 +1,33 @@
+package com.example.how.to.pray;
+
+import android.app.Activity;
+import android.app.ListActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.Toast;
+
+public class PrayersListActivty extends ListActivity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ // TODO Auto-generated method stub
+ super.onCreate(savedInstanceState);
+ requestWindowFeature(Window.FEATURE_NO_TITLE);
+ this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ String[] values = new String[] { "فجر", "ظهر", "عصر",
+ "مغرب", "عشاء" };
+ // Use your own layout
+ ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
+ R.layout.prayer_list, R.id.label, values);
+ setListAdapter(adapter);
+ }
+
+ @Override
+ protected void onListItemClick(ListView l, View v, int position, long id) {
+ String item = (String) getListAdapter().getItem(position);
+ Toast.makeText(this, item + " selected", Toast.LENGTH_LONG).show();
+ }
+}
View
13 How to pray/src/com/example/how/to/pray/StartActivty.java
@@ -2,8 +2,8 @@
import android.os.Bundle;
import android.app.Activity;
-import android.view.Menu;
-import android.view.MenuItem;
+import android.content.Intent;
+import android.view.*;
import android.support.v4.app.NavUtils;
public class StartActivty extends Activity {
@@ -11,7 +11,16 @@
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ requestWindowFeature(Window.FEATURE_NO_TITLE);
+ this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_start_activty);
+ try {
+ Thread.sleep(4000);
+ startActivity(new Intent(this, PrayersListActivty.class));
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
}
@Override
Please sign in to comment.
Something went wrong with that request. Please try again.