Skip to content

Commit 2c3eff3

Browse files
UI Skeleton is done
0 parents  commit 2c3eff3

File tree

83 files changed

+1185
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1185
-0
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 23
5+
buildToolsVersion "23.0.2"
6+
7+
defaultConfig {
8+
applicationId "com.fakhouri.salim.quest"
9+
minSdkVersion 15
10+
targetSdkVersion 23
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
testCompile 'junit:junit:4.12'
25+
compile 'com.android.support:appcompat-v7:23.1.1'
26+
compile 'com.android.support:design:23.1.1'
27+
}

app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in C:\Users\salim\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.fakhouri.salim.quest;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}

app/src/main/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.fakhouri.salim.quest">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity
12+
android:name=".MainActivity"
13+
android:label="@string/app_name"
14+
android:theme="@style/AppTheme.NoActionBar">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
package com.fakhouri.salim.quest;
2+
3+
import android.os.Bundle;
4+
import android.support.design.widget.FloatingActionButton;
5+
import android.support.design.widget.NavigationView;
6+
import android.support.design.widget.Snackbar;
7+
import android.support.v4.widget.DrawerLayout;
8+
import android.support.v7.app.ActionBarDrawerToggle;
9+
import android.support.v7.app.AppCompatActivity;
10+
import android.support.v7.widget.Toolbar;
11+
import android.view.View;
12+
import android.view.Menu;
13+
import android.view.MenuItem;
14+
15+
public class MainActivity extends AppCompatActivity {
16+
17+
18+
DrawerLayout drawerLayout;
19+
NavigationView navigationView;
20+
android.support.v4.app.FragmentTransaction transaction;
21+
android.support.v4.app.FragmentManager manager;
22+
@Override
23+
protected void onCreate(Bundle savedInstanceState) {
24+
super.onCreate(savedInstanceState);
25+
setContentView(R.layout.activity_main);
26+
27+
28+
drawerLayout = (DrawerLayout)findViewById(R.id.drawerLayout);
29+
navigationView = (NavigationView)findViewById(R.id.shitstuff);
30+
/**
31+
* Lets inflate the very first fragment
32+
* Here , we are inflating the TabFragment as the first Fragment
33+
*/
34+
35+
manager = getSupportFragmentManager();
36+
transaction = manager.beginTransaction();
37+
transaction.replace(R.id.containerView,new TabFragment()).commit();
38+
39+
/**
40+
* Setup click events on the Navigation View Items.
41+
*/
42+
43+
navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
44+
@Override
45+
public boolean onNavigationItemSelected(MenuItem item) {
46+
// when user clicks close the drawer
47+
drawerLayout.closeDrawers();
48+
49+
if (item.getItemId() == R.id.firstItem) {
50+
51+
// replace with tab fragment
52+
android.support.v4.app.FragmentTransaction transaction = manager.beginTransaction();
53+
transaction.replace(R.id.containerView, new TabFragment()).commit();
54+
55+
}
56+
57+
if (item.getItemId() == R.id.secondItem) {
58+
android.support.v4.app.FragmentTransaction transaction = manager.beginTransaction();
59+
transaction.replace(R.id.containerView, new NothingFragment());
60+
transaction.addToBackStack("other");
61+
transaction.commit();
62+
63+
64+
}
65+
66+
// rest of the menu
67+
68+
return false;
69+
}
70+
});
71+
72+
73+
// setup drawer toggle
74+
android.support.v7.widget.Toolbar toolbar = (android.support.v7.widget.Toolbar) findViewById(R.id.toolbar);
75+
ActionBarDrawerToggle mDrawerToggle = new ActionBarDrawerToggle(this,drawerLayout, toolbar,R.string.app_name,
76+
R.string.app_name);
77+
78+
drawerLayout.setDrawerListener(mDrawerToggle);
79+
mDrawerToggle.syncState();
80+
81+
82+
83+
84+
}
85+
86+
87+
88+
89+
90+
91+
@Override
92+
public boolean onCreateOptionsMenu(Menu menu) {
93+
// Inflate the menu; this adds items to the action bar if it is present.
94+
getMenuInflater().inflate(R.menu.menu_main, menu);
95+
return true;
96+
}
97+
98+
@Override
99+
public boolean onOptionsItemSelected(MenuItem item) {
100+
// Handle action bar item clicks here. The action bar will
101+
// automatically handle clicks on the Home/Up button, so long
102+
// as you specify a parent activity in AndroidManifest.xml.
103+
int id = item.getItemId();
104+
105+
//noinspection SimplifiableIfStatement
106+
if (id == R.id.action_settings) {
107+
return true;
108+
}
109+
110+
return super.onOptionsItemSelected(item);
111+
}
112+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.fakhouri.salim.quest;
2+
3+
import android.os.Bundle;
4+
import android.support.annotation.Nullable;
5+
import android.support.design.widget.FloatingActionButton;
6+
import android.support.design.widget.Snackbar;
7+
import android.support.v4.app.Fragment;
8+
import android.view.LayoutInflater;
9+
import android.view.View;
10+
import android.view.ViewGroup;
11+
12+
/**
13+
* Created by salim on 12/13/2015.
14+
*/
15+
public class MapFragment extends Fragment {
16+
17+
18+
@Nullable
19+
@Override
20+
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
21+
View view = inflater.inflate(R.layout.map_layout,container,false);
22+
23+
return view;
24+
}
25+
26+
@Override
27+
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
28+
super.onActivityCreated(savedInstanceState);
29+
FloatingActionButton fab = (FloatingActionButton) getActivity().findViewById(R.id.fab);
30+
fab.setOnClickListener(new View.OnClickListener() {
31+
@Override
32+
public void onClick(View view) {
33+
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
34+
.setAction("Action", null).show();
35+
}
36+
});
37+
}
38+
}

0 commit comments

Comments
 (0)