Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI + categoriesData #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions action.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"genre":{
"action":[
{"id":99861,"title":"Avengers: Age of Ultron","v_url":"null","poster_path":"/qJawKUQcIBha507UahUlX0keOT7.jpg"
},

{"id":102899,"title":"Ant-Man","v_url":"null","poster_path":"/tdKbDECJQ3JmYaMubNaKFM1mgcY.jpg"},

{"id":140607,"title":"Star Wars: The Force Awakens","v_url":"null","poster_path":"/iTQHKziZy9pAAY4hHEDCGPaOvFC.jpg"},

{"id":76341,"title":"Mad Max: Fury Road","v_url":"null","poster_path":"/jZowUf4okNYuSlgj5iURE7CDMho.jpg"},

{"id":177677,"title":"Mission: Impossible - Rogue Nation","v_url":"null","poster_path":"/gwyJPIhCK4Xz2WogeBnhCSQfUek.jpg"}
]}}


15 changes: 15 additions & 0 deletions adventure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"genre":{
"adventure":[
{"id":83542,"title":"Cloud Atlas","v_url":"null","poster_path":"/8VNiyIp67ZxhpNgdrwACW0jgvP2.jpg"},

{"id":50620,"title":"The Twilight Saga: Breaking Dawn - Part 2","v_url":"null","poster_path":"/2o4zgGjVryMOPdNqLZWsSPqRkOH.jpg"},

{"id":351286,"title":"Jurassic World: Fallen Kingdom","v_url":"null","poster_path":"/qIm2nHXLpBBdMxi8dvfrnDkBUDh.jpg"},

{"id":449749,"title":"The Leisure Seeker","v_url":"null","poster_path":"/pJfftuCDhK1DFvzBUIfpykXp20U.jpg"},

{"id":300668,"title":"Annihilation","v_url":"null","poster_path":"/d3qcpfNwbAMCNqWDHzPQsUYiUgS.jpg"}
]}}


1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="ExtraText">
<activity android:name=".activity.Drawer">
<activity android:name=".activity.MovieCategories">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -28,6 +28,7 @@
<activity android:name=".extra.download1" />
<activity android:name=".extra.video" />
<activity android:name=".activity.MovieDetail" android:exported="true"/>
<activity android:name=".activity.Drawer"/>
<activity android:name=".activity.MovieMain"/>
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected void onCreate(Bundle savedInstanceState) {
Bundle bundle = getIntent().getExtras();
String id = bundle.getString("id");
JsonObjectRequest jsObj = new JsonObjectRequest
(Request.Method.GET, "http://api.themoviedb.org/3/movie/" + id + "?api_key=c94d74f77ae9409c43d2d3d74a1c5d3f&append_to_response=videos", null, new Response.Listener<JSONObject>() {
(Request.Method.GET, "http://api.themoviedb.org/3/movie/" + id + "?api_key="+getString(R.string.api_key)+"&append_to_response=videos", null, new Response.Listener<JSONObject>() {


@Override
Expand Down
22 changes: 22 additions & 0 deletions app/src/main/java/com/travis/movie/activity/MovieCategories.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.travis.movie.activity;

import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.WindowManager;

import com.travis.movie.R;

/**
* Created by LENOVO on 18-08-2018.
*/

public class MovieCategories extends AppCompatActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
setContentView(R.layout.movie_category_action);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected void onCreate(Bundle savedInstanceState) {
revenue = findViewById(R.id.revenue);
rating = findViewById(R.id.ratingBar);
JsonObjectRequest jsObjRequest = new JsonObjectRequest
(Request.Method.GET, "http://api.themoviedb.org/3/movie/" + id + "?api_key=c94d74f77ae9409c43d2d3d74a1c5d3f&append_to_response=videos", null, new Response.Listener<JSONObject>() {
(Request.Method.GET, "http://api.themoviedb.org/3/movie/" + id + "?api_key="+getString(R.string.api_key)+"&append_to_response=videos", null, new Response.Listener<JSONObject>() {


@Override
Expand Down
Loading