Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Import of Biohazard's work #74

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ed6da41
Merge pull request #1 from xda/master
BioHaZard1 Oct 17, 2014
0232614
Merge branch 'master' of https://github.com/xda/XDA-One
BioHaZard1 Mar 9, 2015
214e4d0
Materialize update
Mar 29, 2015
254bed8
Version bump
Mar 29, 2015
48dc22e
Fixed XDA News FC
Mar 29, 2015
ca5559a
User Profile: Fixed layout bugs and hardcoded strings
Mar 29, 2015
28891c2
Fixed hardcoded string
Mar 29, 2015
fb4e364
Merge pull request #2 from BioHaZard1/materialized-update
BioHaZard1 Mar 29, 2015
8213c2f
CyanogenMod theme fixes
Mar 29, 2015
f97c03e
Add more space between user profile panels
Mar 29, 2015
ebff917
Merge pull request #3 from BioHaZard1/masterialize-update
BioHaZard1 Mar 30, 2015
dc123aa
Add missing commits
Mar 31, 2015
fb433bf
Close drawer on Backpress
Mar 31, 2015
0647635
Fix navigation drawer width
Apr 3, 2015
a99853c
Fix navigation drawer header height on Pre-Lollipop
Apr 3, 2015
a5ec355
Fix navigation drawer width (Part 2)
Apr 3, 2015
57d2661
Improve Private Message layout
Apr 4, 2015
2345714
Ajust EditText style
Apr 5, 2015
7339a13
Improve Create Message Dialog layout
Apr 5, 2015
51583d9
Post view improvements
Apr 5, 2015
ab32da6
Improve Quote/Mention layout
Apr 6, 2015
90f8771
Ajust post action selected colour
Apr 6, 2015
5d2262f
Version bump
Apr 6, 2015
9977cb9
Navigation drawer width fix for HDPI phones
Apr 6, 2015
b374d66
Fix post username colour
Apr 11, 2015
0da18bf
gradle: update gradle and libraries to latest versions
LalitMaganti Apr 23, 2015
0f0ead3
forums: remove dividers
LalitMaganti Apr 23, 2015
1ac13c0
recycler: clearly distinguish between card and list recyclers
LalitMaganti Apr 23, 2015
fa36f0e
news: improve look of news cards
LalitMaganti Apr 23, 2015
151ab53
threads: make thread tiles dynamically resize
LalitMaganti Apr 23, 2015
4b970e4
post: turn post cards into tiles as well
LalitMaganti Apr 23, 2015
ac001bd
post: thread: reduce elevation and switch actions around in posts
LalitMaganti Apr 23, 2015
9222aae
subscribed-threads: fix unread status propogating back to thread from…
LalitMaganti Apr 23, 2015
12dc350
posts: threads: multiple updates
LalitMaganti Apr 23, 2015
1957b71
Merge branch 'master' into biohazard-import-staging
LalitMaganti Apr 23, 2015
c709171
gradle: remove maven central
LalitMaganti Apr 23, 2015
c73f006
gradle: fix merge issues
LalitMaganti Apr 23, 2015
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
Binary file added android/android-simple-release.apk
Binary file not shown.
46 changes: 23 additions & 23 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apply plugin: 'crashlytics'
apply plugin: 'newrelic'

android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
compileSdkVersion 22
buildToolsVersion '22.0.1'

lintOptions {
abortOnError false
Expand All @@ -25,7 +25,7 @@ android {
defaultConfig {
applicationId 'com.xda.one'
minSdkVersion 14
targetSdkVersion 21
targetSdkVersion 22
}

buildTypes {
Expand Down Expand Up @@ -56,38 +56,38 @@ android {
}

dependencies {
compile 'com.google.android.gms:play-services-plus:6.5.+'
compile 'com.google.android.gms:play-services-identity:6.5.+'
compile 'com.google.android.gms:play-services-plus:7.0.0'
compile 'com.google.android.gms:play-services-identity:7.0.0'
compile 'com.google.android.gms:play-services-analytics:7.0.0'

compile 'com.crashlytics.android:crashlytics:1.+'

compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.android.support:support-v4:22.1.0'
compile 'com.android.support:appcompat-v7:22.1.0'
compile 'com.android.support:cardview-v7:22.1.0'
compile 'com.android.support:recyclerview-v7:22.1.0'

compile 'com.squareup.retrofit:retrofit:1.8.0'
compile 'com.squareup.retrofit:converter-jackson:1.8.0'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.retrofit:converter-jackson:1.9.0'
compile 'com.squareup.picasso:picasso:2.5.2'

compile 'com.fasterxml.jackson.core:jackson-databind:2.5.0-rc1'
compile 'com.fasterxml.jackson.core:jackson-core:2.5.0-rc1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.0-rc1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.2'
compile 'com.fasterxml.jackson.core:jackson-core:2.5.2'
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.2'

compile 'com.squareup:otto:1.3.5'
compile 'com.squareup:otto:1.3.6'

compile 'net.nightwhistler.htmlspanner:htmlspanner:0.5-SNAPSHOT'

compile 'com.makeramen:roundedimageview:1.3.0'
compile 'me.grantland:autofittextview:0.2.0'
compile 'com.makeramen:roundedimageview:2.0.1'
compile 'me.grantland:autofittextview:0.2.1'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'

compile 'org.apache.commons:commons-lang3:3.3.2'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'commons-io:commons-io:2.4'

compile 'com.newrelic.agent.android:android-agent:4.+'
compile 'com.newrelic.agent.android:android-agent:4.273.4'

compile fileTree(dir: 'libs', include: '*.jar')
compile fileTree(include: '*.jar', dir: 'libs')
}

def Properties props = new Properties()
Expand All @@ -108,4 +108,4 @@ if (propFile.canRead()) {
} else {
println 'signing.properties not found'
android.buildTypes.release.signingConfig = null
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.xda.one.auth;

import com.xda.one.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;

public class XDAAuthenticatorActivity extends FragmentActivity {
import com.xda.one.R;

private final String SCREEN_NAME = "XDAAuthenticatorActivity";
public class XDAAuthenticatorActivity extends AppCompatActivity {

@Override
public void onCreate(final Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.xda.one.model.augmented;

import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.Spannable;

import com.xda.one.api.model.interfaces.UnifiedThread;
import com.xda.one.api.model.response.ResponseUnifiedThread;
import com.xda.one.parser.ContentParser;
import com.xda.one.parser.TextDataStructure;
import com.xda.one.util.PostUtils;
import com.xda.one.util.StringUtils;

import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.Spannable;

public class AugmentedUnifiedThread implements UnifiedThread {

Expand All @@ -27,7 +26,7 @@ public AugmentedUnifiedThread[] newArray(int size) {
}
};

private static final int MAX_STRING_LENGTH = 100;
private static final int MAX_STRING_LENGTH = 200;

private final UnifiedThread mUnifiedThread;

Expand Down
3 changes: 2 additions & 1 deletion android/src/main/java/com/xda/one/ui/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import com.xda.one.util.OneApplication;

import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;

public abstract class BaseActivity extends ActionBarActivity {
public abstract class BaseActivity extends AppCompatActivity {

public OneApplication getOneApplication() {
return (OneApplication) super.getApplication();
Expand Down
14 changes: 7 additions & 7 deletions android/src/main/java/com/xda/one/ui/FindYourDeviceAdapter.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
package com.xda.one.ui;

import com.squareup.picasso.Picasso;
import com.xda.one.R;
import com.xda.one.api.model.response.ResponseForum;
import com.xda.one.db.ForumDbHelper;

import android.content.Context;
import android.database.Cursor;
import android.support.v7.widget.RecyclerView;
Expand All @@ -14,6 +9,11 @@
import android.widget.ImageView;
import android.widget.TextView;

import com.squareup.picasso.Picasso;
import com.xda.one.R;
import com.xda.one.api.model.response.ResponseForum;
import com.xda.one.db.ForumDbHelper;

public class FindYourDeviceAdapter
extends RecyclerView.Adapter<FindYourDeviceAdapter.FindYourDeviceViewHolder> {

Expand Down Expand Up @@ -48,8 +48,8 @@ public void onBindViewHolder(final FindYourDeviceViewHolder holder, final int po

Picasso.with(mContext)
.load(forum.getImageUrl())
.placeholder(R.drawable.phone)
.error(R.drawable.phone)
.placeholder(R.drawable.ic_nav_phone)
.error(R.drawable.ic_nav_phone)
.into(holder.imageView);
}

Expand Down
63 changes: 32 additions & 31 deletions android/src/main/java/com/xda/one/ui/ForumFragment.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
package com.xda.one.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.support.v4.view.MenuItemCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.view.ActionMode;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.ShareActionProvider;
import android.support.v7.widget.XDALinerLayoutManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.Toast;

import com.squareup.otto.Subscribe;
import com.squareup.picasso.Picasso;
import com.xda.one.R;
Expand All @@ -15,34 +36,15 @@
import com.xda.one.loader.ForumLoader;
import com.xda.one.model.misc.ForumType;
import com.xda.one.ui.helper.ActionModeHelper;
import com.xda.one.ui.helper.QuickReturnHelper;
import com.xda.one.ui.widget.DividerItemDecoration;
import com.xda.one.ui.widget.HierarchySpinnerAdapter;
import com.xda.one.ui.widget.XDARefreshLayout;
import com.xda.one.util.AccountUtils;
import com.xda.one.util.FragmentUtils;
import com.xda.one.util.UIUtils;
import com.xda.one.util.Utils;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.support.v4.view.MenuItemCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.view.ActionMode;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.ShareActionProvider;
import android.support.v7.widget.XDALinerLayoutManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -70,7 +72,6 @@ public class ForumFragment extends Fragment

private ForumType mForumType = ForumType.ALL;

// Adapter for ListView
private ForumAdapter<Forum> mAdapter;

private XDARefreshLayout mRefreshLayout;
Expand All @@ -94,7 +95,7 @@ public static ForumFragment createInstance(final ForumType forumType) {
}

public static ForumFragment createInstance(final Forum forum, final String parentTitle,
final ArrayList<String> hierarchy) {
final ArrayList<String> hierarchy) {
final Bundle bundle = new Bundle();
bundle.putSerializable(FORUM_TYPE, ForumType.CHILD);
bundle.putParcelable(FORUM, forum);
Expand Down Expand Up @@ -154,7 +155,7 @@ public void setupImageViewDevice(ImageView imageView, Forum forum) {
new ForumAdapter.SubscribeButtonDelegate() {
@Override
public void setupSubscribeButton(ImageView subscribeButton,
final Forum forum) {
final Forum forum) {
// Subscribe button
onSetupSubscribeButton(subscribeButton, forum);
}
Expand All @@ -175,16 +176,16 @@ public void onClick(final View view) {
}
});
subscribeButton.setImageResource(forum.isSubscribed()
? R.drawable.ic_star_light
: R.drawable.ic_star_outline_light);
? R.drawable.ic_star_outline_selected
: R.drawable.ic_star_outline);
}
}

private void onSetupImageViewListItem(final ImageView imageView, final Forum responseForum) {
Picasso.with(getActivity())
.load(responseForum.getImageUrl())
.placeholder(R.drawable.phone)
.error(R.drawable.phone)
.placeholder(R.drawable.ic_nav_phone)
.error(R.drawable.ic_nav_phone)
.into(imageView);
}

Expand All @@ -195,7 +196,7 @@ private void onListItemClicked(final Forum forum) {

@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
final Bundle savedInstanceState) {
return inflater.inflate(R.layout.forum_fragment, container, false);
}

Expand Down Expand Up @@ -261,7 +262,7 @@ public Loader<List<ResponseForum>> onCreateLoader(final int id, final Bundle bun

@Override
public void onLoadFinished(final Loader<List<ResponseForum>> loader,
final List<ResponseForum> responseForums) {
final List<ResponseForum> responseForums) {
// Remove the old data if the adapter is not empty
if (mAdapter.getItemCount() != 0) {
mAdapter.clear();
Expand Down Expand Up @@ -360,7 +361,7 @@ public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {

@Override
public void onCheckedStateChanged(final ActionMode actionMode, final int position,
final boolean isNowChecked) {
final boolean isNowChecked) {
actionMode.invalidate();
}
}
Expand Down
8 changes: 8 additions & 0 deletions android/src/main/java/com/xda/one/ui/ForumPagerFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import com.xda.one.api.model.response.ResponseForum;
import com.xda.one.db.ForumDbHelper;
import com.xda.one.model.misc.ForumType;
import com.xda.one.ui.helper.QuickReturnHelper;
import com.xda.one.ui.widget.TabLayout;
import com.xda.one.util.FragmentUtils;
import com.xda.one.util.UIUtils;

import android.app.Activity;
import android.app.SearchManager;
import android.content.Context;
import android.database.Cursor;
Expand All @@ -21,6 +23,7 @@
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.Menu;
Expand Down Expand Up @@ -206,4 +209,9 @@ public boolean onSuggestionClick(final int position) {
return true;
}
}

public interface Callback {

Toolbar getToolbar();
}
}
Loading