Skip to content

Commit

Permalink
full_news24x7_v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vikasdesale committed Jun 30, 2017
1 parent c3d4ed5 commit 349fad0
Show file tree
Hide file tree
Showing 58 changed files with 678 additions and 902 deletions.
Binary file modified .gradle/2.14.1/taskArtifacts/cache.properties.lock
Binary file not shown.
Binary file modified .gradle/2.14.1/taskArtifacts/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/2.14.1/taskArtifacts/fileSnapshots.bin
Binary file not shown.
Binary file not shown.
Binary file modified .gradle/2.14.1/taskArtifacts/taskArtifacts.bin
Binary file not shown.
1,187 changes: 465 additions & 722 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.android.news24x7"
applicationId "com.news.news24x7"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7;
package com.news.news24x7;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
Expand All @@ -21,6 +21,6 @@ public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.android.news24x7", appContext.getPackageName());
assertEquals("com.news.news24x7", appContext.getPackageName());
}
}
28 changes: 14 additions & 14 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.news24x7">
package="com.news.news24x7">

<!-- Permissions required by the sync adapter -->
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
Expand All @@ -23,7 +23,7 @@
android:largeHeap="true"
android:theme="@style/AppTheme">
<activity
android:name=".activities.HomeActivity"
android:name="com.news.news24x7.activities.HomeActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/AppTheme.Main">
Expand All @@ -42,58 +42,58 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
<provider
android:name=".database.generated.NewsProvider"
android:authorities="com.android.news24x7"
android:name="com.news.news24x7.database.generated.NewsProvider"
android:authorities="com.news.news24x7"
android:exported="false"
android:syncable="true" />
<activity
android:name="com.android.news24x7.activities.IntroActivity"
android:name="com.news.news24x7.activities.IntroActivity"
android:label="@string/app_intro"/>

<activity
android:name=".activities.DetailsActivity"
android:name="com.news.news24x7.activities.DetailsActivity"
android:label="Description"
android:parentActivityName=".activities.HomeActivity"
android:parentActivityName="com.news.news24x7.activities.HomeActivity"
android:theme="@style/AppTheme.Details">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.android.news24x7.activities.HomeActivity" />
android:value="com.news.news24x7.activities.HomeActivity" />
</activity>

<service
android:name=".sync.NewsSyncIntentService"
android:name="com.news.news24x7.sync.NewsSyncIntentService"
android:exported="false" />

<!-- This is the Service declaration used in conjunction with FirebaseJobDispatcher -->
<service
android:name=".sync.NewsFirebaseJobService"
android:name="com.news.news24x7.sync.NewsFirebaseJobService"
android:exported="false">
<intent-filter>
<action android:name="com.firebase.jobdispatcher.ACTION_EXECUTE" />
</intent-filter>
</service>
<activity
android:name=".activities.SettingsActivity"
android:name="com.news.news24x7.activities.SettingsActivity"
android:label="@string/activity_title_settings"
android:theme="@style/SettingsTheme" />

<!--Widget-->
<receiver
android:name=".widget.NewsWidgetProvider"
android:name="com.news.news24x7.widget.NewsWidgetProvider"
android:enabled="true"
android:label="@string/app_name">

<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="com.android.news24x7.app.ACTION_DATA_UPDATED" />
<action android:name="com.news.news24x7.app.ACTION_DATA_UPDATED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/news_widget_provider" />
</receiver>

<service
android:name=".widget.NewsWidgetService"
android:name="com.news.news24x7.widget.NewsWidgetService"
android:enabled="true"
android:exported="false"
android:permission="android.permission.BIND_REMOTEVIEWS" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7.activities;
package com.news.news24x7.activities;


import android.os.Build;
Expand All @@ -8,11 +8,10 @@
import android.transition.Transition;
import android.transition.TransitionInflater;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;

import com.android.news24x7.R;
import com.android.news24x7.fragments.DetailsFragment;
import com.news.news24x7.R;
import com.news.news24x7.fragments.DetailsFragment;

public class DetailsActivity extends AppCompatActivity {

Expand Down Expand Up @@ -55,12 +54,7 @@ private void setUpWindowAnimations() {
}
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.drawer_view, menu);
return true;

}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7.activities;
package com.news.news24x7.activities;

import android.content.Intent;
import android.content.SharedPreferences;
Expand All @@ -20,12 +20,12 @@
import android.view.MenuItem;
import android.view.View;

import com.android.news24x7.R;
import com.android.news24x7.adapter.NewsRecyclerViewAdapter;
import com.android.news24x7.fragments.NewsFragment;
import com.android.news24x7.util.NewsSyncUtils;
import com.android.news24x7.util.Util;
import com.android.news24x7.widget.NewsWidgetProvider;
import com.news.news24x7.R;
import com.news.news24x7.adapter.NewsRecyclerViewAdapter;
import com.news.news24x7.fragments.NewsFragment;
import com.news.news24x7.util.NewsSyncUtils;
import com.news.news24x7.util.Util;
import com.news.news24x7.widget.NewsWidgetProvider;
import com.google.firebase.analytics.FirebaseAnalytics;

import butterknife.BindView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7.activities;
package com.news.news24x7.activities;

/**
* Created by Dell on 6/24/2017.
Expand All @@ -8,7 +8,7 @@
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;

import com.android.news24x7.R;
import com.news.news24x7.R;
import com.github.paolorotolo.appintro.AppIntro;
import com.github.paolorotolo.appintro.AppIntroFragment;

Expand All @@ -21,11 +21,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {

// Instead of fragments, you can also use our default slide
// Just set a title, description, background and image. AppIntro will do the rest.
addSlide(AppIntroFragment.newInstance(getString(R.string.first_screen), getString(R.string.scr1_desc), R.drawable.screen2, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.second_screen), getString(R.string.scr2_desc), R.drawable.screen3, ContextCompat.getColor(getApplicationContext(), R.color.accent)));
addSlide(AppIntroFragment.newInstance(getString(R.string.third_screen), getString(R.string.scr3_desc), R.drawable.screen4a, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.fourth_screen), getString(R.string.scr4_desc), R.drawable.screen5, ContextCompat.getColor(getApplicationContext(), R.color.accent)));
addSlide(AppIntroFragment.newInstance(getString(R.string.fifth_screen), getString(R.string.scr5_desc), R.drawable.screen6, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.first_screen), getString(R.string.scr1_desc), R.drawable.screen1, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.second_screen), getString(R.string.scr2_desc), R.drawable.screen2, ContextCompat.getColor(getApplicationContext(), R.color.accent)));
addSlide(AppIntroFragment.newInstance(getString(R.string.third_screen), getString(R.string.scr3_desc), R.drawable.screen3, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.fourth_screen), getString(R.string.scr4_desc), R.drawable.screen4, ContextCompat.getColor(getApplicationContext(), R.color.accent)));
addSlide(AppIntroFragment.newInstance(getString(R.string.fifth_screen), getString(R.string.scr5_desc), R.drawable.screen5, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.six_screen), getString(R.string.scr6_desc), R.drawable.screen6, ContextCompat.getColor(getApplicationContext(), R.color.accent)));

// Hide Skip/Done button.
showSkipButton(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7.activities;
package com.news.news24x7.activities;

import android.content.SharedPreferences;
import android.os.Bundle;
Expand All @@ -10,7 +10,7 @@
import android.support.v7.widget.Toolbar;
import android.view.View;

import com.android.news24x7.R;
import com.news.news24x7.R;

import butterknife.BindView;
import butterknife.ButterKnife;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7.adapter;/*
package com.news.news24x7.adapter;/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Matthieu Harlé
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7.adapter;
package com.news.news24x7.adapter;

import android.content.Context;
import android.database.Cursor;
Expand All @@ -10,15 +10,17 @@
import android.widget.ImageView;
import android.widget.TextView;

import com.android.news24x7.R;
import com.android.news24x7.interfaces.ColumnsNews;
import com.news.news24x7.R;
import com.news.news24x7.interfaces.ColumnsNews;
import com.news.news24x7.util.Util;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.news.news24x7.adapter.CursorRecyclerViewAdapter;

import butterknife.BindView;
import butterknife.ButterKnife;

import static com.android.news24x7.R.drawable.placeholder;
import static com.news.news24x7.R.drawable.placeholder;

/**
* Created by Dell on 6/3/2017.
Expand Down Expand Up @@ -49,8 +51,8 @@ public void onBindViewHolderCursor(ViewHolder viewHolder, Cursor cursor) {
if (title != null || url != null) {
viewHolder.textView.setText(title);
viewHolder.textView.setContentDescription(mContext.getString(R.string.content_desc_title)+title);
viewHolder.dates.setText(publishedAt);
viewHolder.dates.setContentDescription(mContext.getString(R.string.content_description_dates)+publishedAt);
viewHolder.dates.setText(Util.manipulateDateFormat(publishedAt));
viewHolder.dates.setContentDescription(mContext.getString(R.string.content_description_dates)+Util.manipulateDateFormat(publishedAt));
//Got Advantages why to use Glide over picasso that's why replaced picasso.
Glide.with(mContext).load(url)
.thumbnail(0.1f)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.android.news24x7.database;
package com.news.news24x7.database;

import com.android.news24x7.interfaces.ColumnsNews;
import com.news.news24x7.interfaces.ColumnsNews;

import net.simonvt.schematic.annotation.Database;
import net.simonvt.schematic.annotation.Table;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.android.news24x7.database;
package com.news.news24x7.database;

import android.net.Uri;

import com.android.news24x7.interfaces.ColumnsNews;
import com.news.news24x7.interfaces.ColumnsNews;

import net.simonvt.schematic.annotation.ContentProvider;
import net.simonvt.schematic.annotation.ContentUri;
Expand All @@ -15,7 +15,7 @@
@ContentProvider(authority = NewsProvider.AUTHORITY, database = NewsDatabase.class)
public class NewsProvider {

public static final String AUTHORITY = "com.android.news24x7";
public static final String AUTHORITY = "com.news.news24x7";
public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + AUTHORITY);

private static Uri buildUri(String... paths) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.android.news24x7.fragments;
package com.news.news24x7.fragments;

import android.content.ActivityNotFoundException;
import android.content.Intent;
Expand All @@ -21,10 +21,10 @@
import android.widget.TextView;
import android.widget.Toast;

import com.android.news24x7.R;
import com.android.news24x7.parcelable.Article;
import com.android.news24x7.util.NewsUtil;
import com.android.news24x7.widget.NewsWidgetProvider;
import com.news.news24x7.R;
import com.news.news24x7.parcelable.Article;
import com.news.news24x7.util.NewsUtil;
import com.news.news24x7.widget.NewsWidgetProvider;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.google.android.gms.ads.AdRequest;
Expand All @@ -39,8 +39,8 @@
import butterknife.ButterKnife;
import butterknife.Unbinder;

import static com.android.news24x7.R.drawable.placeholder;
import static com.android.news24x7.util.NewsUtil.FAVORITE;
import static com.news.news24x7.R.drawable.placeholder;
import static com.news.news24x7.util.NewsUtil.FAVORITE;

public class DetailsFragment extends Fragment implements View.OnClickListener,TextToSpeech.OnInitListener {
String mTitle;
Expand Down Expand Up @@ -160,7 +160,7 @@ public void onClick(View view) {
}

public void ScreenDelete(){
final String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/data/com.android.news24x7/Screenshots/";
final String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/data/com.news.news24x7/Screenshots/";
File file = new File(dirPath);
file.delete();

Expand All @@ -174,7 +174,7 @@ public static Bitmap getScreenShot(View view) {
return bitmap;
}
public void store(Bitmap bm, String fileName){
final String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/data/com.android.news24x7/Screenshots/";
final String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/data/com.news.news24x7/Screenshots/";
File dir = new File(dirPath);
if(!dir.exists())
dir.mkdirs();
Expand All @@ -196,7 +196,7 @@ private void shareImage(File file){
intent.setType("image/*");

intent.putExtra(android.content.Intent.EXTRA_TEXT, getString(R.string.detail_share)
+"\nhttps://w524x.app.goo.gl/PeSx");
+"\nhttps://w524x.app.goo.gl/WMNf");
intent.putExtra(Intent.EXTRA_STREAM, uri);
try {
startActivity(Intent.createChooser(intent, "Share News Article"));
Expand Down
Loading

0 comments on commit 349fad0

Please sign in to comment.