Skip to content

Commit cb8a9d1

Browse files
*Added movielistFragment and MovieDetails fragment
1 parent 2aaeae6 commit cb8a9d1

10 files changed

+122
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/build
88
/captures
9+
/.idea

app/build.gradle

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ android {
2222
dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
testCompile 'junit:junit:4.12'
25+
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
26+
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
27+
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
2528
compile 'com.android.support:appcompat-v7:23.1.1'
2629
compile 'com.android.support:design:23.1.1'
2730
compile 'com.jakewharton:butterknife:7.0.1'
2831
compile 'com.google.code.gson:gson:2.4'
29-
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
3032
compile 'com.github.bumptech.glide:glide:3.6.1'
31-
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
3233
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
3334
compile 'com.squareup.okhttp:okhttp:2.5.0'
34-
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
35+
compile 'com.android.support:support-v4:23.1.1'
3536
}

app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<category android:name="android.intent.category.LAUNCHER" />
1919
</intent-filter>
2020
</activity>
21+
<activity android:name=".PopularMovie.DashboardActivity"></activity>
2122
</application>
2223

2324
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.example.techjini.myappportfolio.PopularMovie;
2+
3+
import android.support.v7.app.AppCompatActivity;
4+
import android.os.Bundle;
5+
6+
import com.example.techjini.myappportfolio.R;
7+
8+
public class DashboardActivity extends AppCompatActivity {
9+
10+
@Override
11+
protected void onCreate(Bundle savedInstanceState) {
12+
super.onCreate(savedInstanceState);
13+
setContentView(R.layout.activity_dashboard);
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.example.techjini.myappportfolio.PopularMovie;
2+
3+
4+
import android.os.Bundle;
5+
import android.support.v4.app.Fragment;
6+
import android.view.LayoutInflater;
7+
import android.view.View;
8+
import android.view.ViewGroup;
9+
10+
import com.example.techjini.myappportfolio.R;
11+
12+
/**
13+
* A simple {@link Fragment} subclass.
14+
*/
15+
public class MovieDetailFragment extends Fragment {
16+
17+
18+
public MovieDetailFragment() {
19+
// Required empty public constructor
20+
}
21+
22+
23+
@Override
24+
public View onCreateView(LayoutInflater inflater, ViewGroup container,
25+
Bundle savedInstanceState) {
26+
// Inflate the layout for this fragment
27+
return inflater.inflate(R.layout.fragment_movie_detail, container, false);
28+
}
29+
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.example.techjini.myappportfolio.PopularMovie;
2+
3+
4+
import android.os.Bundle;
5+
import android.support.v4.app.Fragment;
6+
import android.view.LayoutInflater;
7+
import android.view.View;
8+
import android.view.ViewGroup;
9+
10+
import com.example.techjini.myappportfolio.R;
11+
12+
/**
13+
* A simple {@link Fragment} subclass.
14+
*/
15+
public class MovieListFragment extends Fragment {
16+
17+
18+
public MovieListFragment() {
19+
// Required empty public constructor
20+
}
21+
22+
23+
@Override
24+
public View onCreateView(LayoutInflater inflater, ViewGroup container,
25+
Bundle savedInstanceState) {
26+
// Inflate the layout for this fragment
27+
return inflater.inflate(R.layout.fragment_movie_list, container, false);
28+
}
29+
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:paddingBottom="@dimen/activity_vertical_margin"
7+
android:paddingLeft="@dimen/activity_horizontal_margin"
8+
android:paddingRight="@dimen/activity_horizontal_margin"
9+
android:paddingTop="@dimen/activity_vertical_margin"
10+
tools:context="com.example.techjini.myappportfolio.PopularMovie.DashboardActivity">
11+
12+
</RelativeLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
tools:context="com.example.techjini.myappportfolio.PopularMovie.MovieDetailFragment">
6+
7+
<!-- TODO: Update blank fragment layout -->
8+
<TextView
9+
android:layout_width="match_parent"
10+
android:layout_height="match_parent"
11+
android:text="@string/hello_blank_fragment" />
12+
13+
</FrameLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
tools:context="com.example.techjini.myappportfolio.PopularMovie.MovieListFragment">
6+
7+
<!-- TODO: Update blank fragment layout -->
8+
<TextView
9+
android:layout_width="match_parent"
10+
android:layout_height="match_parent"
11+
android:text="@string/hello_blank_fragment" />
12+
13+
</FrameLayout>

app/src/main/res/values/strings.xml

+3
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010
<string name="capstone">Capstone:My own App</string>
1111
<string name="my_nano_app">My Nanodegree App</string>
1212
<string name="this_button_will_launch_my">This button will launch my</string>
13+
14+
<!-- TODO: Remove or change this placeholder text -->
15+
<string name="hello_blank_fragment">Hello blank fragment</string>
1316
</resources>

0 commit comments

Comments
 (0)