diff --git a/.travis.yml b/.travis.yml index 90b0f83d..b530c1f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,6 @@ before_script: - (while sleep 3; do echo "y"; done) | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;26.0.0-rc2" "platforms;android-O" --channel=2 script: - - ./gradlew clean assembleFdroidDebug - ./gradlew clean assembleGmsDebug after_success: diff --git a/app/build.gradle b/app/build.gradle index 58ecf45c..b67e2bea 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'com.android.application' +apply plugin: 'com.google.firebase.firebase-crash' apply plugin: 'kotlin-android' - apply plugin: 'com.novoda.build-properties' apply plugin: 'jacoco-android' @@ -56,14 +56,6 @@ android { flavorDimensions "platform" - productFlavors { - // includes gms - gms { - dimension "platform" - } - - } - sourceSets { main { res.srcDirs = [ @@ -149,16 +141,17 @@ dependencies { implementation 'net.sourceforge.htmlcleaner:htmlcleaner:2.2' implementation 'com.github.matthiasrobbers:shortbread:1.0.1' implementation 'com.atlassian.commonmark:commonmark:0.9.0' + implementation "com.google.firebase:firebase-ads:${gms}" + implementation "com.google.firebase:firebase-messaging:${gms}" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" + releaseImplementation "com.google.firebase:firebase-crash:${gms}" + implementation "com.google.android.gms:play-services-auth:${gms}" compileOnly "org.projectlombok:lombok:${lombokVersion}" annotationProcessor "io.requery:requery-processor:${requery}" annotationProcessor "org.projectlombok:lombok:${lombokVersion}" annotationProcessor "frankiesardo:icepick-processor:${icepickVersion}" annotationProcessor "com.jakewharton:butterknife-compiler:${butterKnifeVersion}" annotationProcessor 'com.github.matthiasrobbers:shortbread-compiler:1.0.1' - implementation "com.google.firebase:firebase-ads:${gms}" - implementation "com.google.firebase:firebase-messaging:${gms}" - releaseImplementation "com.google.firebase:firebase-crash:${gms}" - implementation "com.google.android.gms:play-services-auth:${gms}" testImplementation "net.grandcentrix.thirtyinch:thirtyinch-test:$thirtyinchVersion" testImplementation "junit:junit:${junitVersion}" testImplementation "org.mockito:mockito-core:${mockitoVersion}" @@ -169,8 +162,6 @@ dependencies { androidTestImplementation 'com.android.support.test:rules:0.5' androidTestImplementation "com.android.support.test.espresso:espresso-intents:${espresseVersion}" androidTestImplementation "com.android.support.test.espresso:espresso-core:${espresseVersion}" - compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" } -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.firebase-crash' \ No newline at end of file +apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/app/src/debug/google-services.json b/app/src/debug/google-services.json deleted file mode 100644 index f4a540c9..00000000 --- a/app/src/debug/google-services.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "project_info": { - "project_id": "this-is-a-sample", - "project_number": "999999999999", - "name": "FastHub Sample", - "firebase_url": "https://this-is-a-sample-do-not-use.firebaseio.com", - "storage_bucket": "this-is-a-sample-do-not-use.storage.firebase.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:999999999999:android:0000000000000000", - "android_client_info": { - "package_name": "com.fastaccess.github" - } - }, - "oauth_client": [ - { - "client_id": "this-is-a-sample-do-not-use.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.fastaccess.github", - "certificate_hash": "0000000000000000000000000000000000000000" - } - }, - { - "client_id": "this-is-a-sample-do-not-use.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.fastaccess.github", - "certificate_hash": "0000000000000000000000000000000000000000" - } - }, - { - "client_id": "this-is-a-sample-do-not-use.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "000000000000000000000000000000000000000" - } - ], - "services": { - "analytics_service": { - "status": 1 - }, - "appinvite_service": { - "status": 2, - "other_platform_oauth_client": [ - { - "client_id": "this-is-a-sample-do-not-use.apps.googleusercontent.com", - "client_type": 3 - } - ] - }, - "ads_service": { - "status": 2 - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/app/src/fdroid/AndroidManifest.xml b/app/src/fdroid/AndroidManifest.xml deleted file mode 100644 index cb49a4c7..00000000 --- a/app/src/fdroid/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/src/fdroid/java/com/fastaccess/ui/base/AdActivity.java b/app/src/fdroid/java/com/fastaccess/ui/base/AdActivity.java deleted file mode 100644 index 59125b52..00000000 --- a/app/src/fdroid/java/com/fastaccess/ui/base/AdActivity.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.fastaccess.ui.base; - -import android.support.annotation.Nullable; -import android.widget.TextView; - -import com.fastaccess.R; - -import net.grandcentrix.thirtyinch.TiActivity; -import net.grandcentrix.thirtyinch.TiPresenter; -import net.grandcentrix.thirtyinch.TiView; - -import butterknife.BindView; - -/** - * Created by thermatk on 12.04.17. - */ - -public abstract class AdActivity> extends TiActivity { - - @Nullable @BindView(R.id.adView) TextView adView; - - protected void showHideAds() { - - } -} diff --git a/app/src/fdroid/res/values/secrets.xml b/app/src/fdroid/res/values/secrets.xml deleted file mode 100644 index 48dd458c..00000000 --- a/app/src/fdroid/res/values/secrets.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - your_product_1 - your_product_2 - your_product_3 - your_product_4 - diff --git a/app/src/gms/java/com/fastaccess/ui/base/AdActivity.java b/app/src/gms/java/com/fastaccess/ui/base/AdActivity.java deleted file mode 100644 index ec01a88f..00000000 --- a/app/src/gms/java/com/fastaccess/ui/base/AdActivity.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.fastaccess.ui.base; - -import android.support.annotation.Nullable; -import android.view.View; - -import com.fastaccess.R; -import com.fastaccess.helper.PrefGetter; -import com.google.android.gms.ads.AdRequest; -import com.google.android.gms.ads.AdView; -import com.google.android.gms.ads.MobileAds; - -import net.grandcentrix.thirtyinch.TiActivity; -import net.grandcentrix.thirtyinch.TiPresenter; -import net.grandcentrix.thirtyinch.TiView; - -import butterknife.BindView; - -/** - * Created by thermatk on 12.04.17. - */ - -public abstract class AdActivity> extends TiActivity { - - @Nullable @BindView(R.id.adView) AdView adView; - - @Override protected void onResume() { - super.onResume(); - if (adView != null && adView.isShown()) { - adView.resume(); - } - } - - @Override protected void onPause() { - if (adView != null && adView.isShown()) { - adView.pause(); - } - super.onPause(); - } - - @Override protected void onDestroy() { - if (adView != null && adView.isShown()) { - adView.destroy(); - } - super.onDestroy(); - } - - protected void showHideAds() { - if (adView != null) { - boolean isAdsEnabled = PrefGetter.isAdsEnabled(); - if (isAdsEnabled) { - adView.setVisibility(View.VISIBLE); - MobileAds.initialize(this, getString(R.string.banner_ad_unit_id)); - AdRequest adRequest = new AdRequest.Builder() - .addTestDevice(getString(R.string.test_device_id)) - .build(); - adView.loadAd(adRequest); - } else { - adView.destroy(); - adView.setVisibility(View.GONE); - } - } - } -} diff --git a/app/src/gms/res/layout/add_banner_layout.xml b/app/src/gms/res/layout/add_banner_layout.xml deleted file mode 100644 index dfa6ce3f..00000000 --- a/app/src/gms/res/layout/add_banner_layout.xml +++ /dev/null @@ -1,13 +0,0 @@ - - \ No newline at end of file diff --git a/app/src/gms/java/com/fastaccess/provider/fcm/PushNotificationService.java b/app/src/main/java/com/fastaccess/provider/fcm/PushNotificationService.java similarity index 100% rename from app/src/gms/java/com/fastaccess/provider/fcm/PushNotificationService.java rename to app/src/main/java/com/fastaccess/provider/fcm/PushNotificationService.java diff --git a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java index 2fbb7d86..d8511fbd 100644 --- a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java +++ b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java @@ -52,6 +52,8 @@ import com.fastaccess.ui.widgets.dialog.MessageDialogView; import com.fastaccess.ui.widgets.dialog.ProgressDialogFragment; import com.nostra13.universalimageloader.core.ImageLoader; +import net.grandcentrix.thirtyinch.TiActivity; + import java.util.ArrayList; import butterknife.BindView; @@ -64,7 +66,7 @@ import icepick.State; * Created by Kosh on 24 May 2016, 8:48 PM */ -public abstract class BaseActivity> extends AdActivity implements +public abstract class BaseActivity> extends TiActivity implements BaseMvp.FAView, NavigationView.OnNavigationItemSelectedListener { @State boolean isProgressShowing; @@ -112,7 +114,7 @@ public abstract class BaseActivity dismissed[0] = true); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/overview/ProfileOverviewFragment.java b/app/src/main/java/com/fastaccess/ui/modules/profile/overview/ProfileOverviewFragment.java index e202a680..5ca71b6f 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/overview/ProfileOverviewFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/overview/ProfileOverviewFragment.java @@ -8,6 +8,7 @@ import android.support.annotation.StringRes; import android.support.v4.widget.NestedScrollView; import android.support.v7.widget.CardView; import android.view.View; +import android.view.ViewGroup; import android.widget.Button; import com.fastaccess.R; @@ -35,12 +36,18 @@ import butterknife.BindView; import butterknife.OnClick; import icepick.State; +import static android.view.View.GONE; + /** * Created by Kosh on 03 Dec 2016, 9:16 AM */ public class ProfileOverviewFragment extends BaseFragment implements ProfileOverviewMvp.View { + @BindView(R.id.contributionsCaption) + FontTextView contributionsCaption; + @BindView(R.id.organizationsCaption) + FontTextView organizationsCaption; @BindView(R.id.username) FontTextView username; @BindView(R.id.description) FontTextView description; @BindView(R.id.avatarLayout) AvatarLayout avatarLayout; @@ -109,7 +116,7 @@ public class ProfileOverviewFragment extends BaseFragment - + tools:visibility="visible"/> \ No newline at end of file diff --git a/app/src/main/res/layouts/row_layouts/layout/profile_overview_layout.xml b/app/src/main/res/layouts/row_layouts/layout/profile_overview_layout.xml index f786522f..51083644 100644 --- a/app/src/main/res/layouts/row_layouts/layout/profile_overview_layout.xml +++ b/app/src/main/res/layouts/row_layouts/layout/profile_overview_layout.xml @@ -1,262 +1,315 @@ + + android:clipToPadding="false"> + android:orientation="vertical"> - + app:cardBackgroundColor="?card_background" + app:cardUseCompatPadding="false" + app:cardCornerRadius="0dp" + app:contentPaddingBottom="@dimen/spacing_normal" + app:contentPaddingLeft="@dimen/spacing_xs_large" + app:contentPaddingRight="@dimen/spacing_xs_large" + app:contentPaddingTop="@dimen/spacing_xs_large"> - - - + android:layout_marginTop="@dimen/spacing_xs_large" + android:orientation="vertical"> + android:orientation="horizontal" + android:paddingBottom="@dimen/spacing_xs_large" + android:gravity="center_vertical"> + + - - - - - - - - - - - - - - - - - - - - - - + android:paddingTop="@dimen/spacing_xs_large" + android:paddingBottom="@dimen/spacing_xs_large" + android:autoLink="all" + tools:text="What’s the secret to large and cold peanut butter? Always use quartered szechuan pepper."/> - - tools:text="Cum classis nocere"/> + - + - + - + android:layout_marginBottom="@dimen/spacing_xs_large" + android:drawablePadding="@dimen/spacing_normal" + android:drawableStart="@drawable/asl_follow" + android:paddingBottom="@dimen/spacing_normal" + android:paddingEnd="@dimen/spacing_xs_large" + android:paddingStart="@dimen/spacing_xs_large" + android:paddingTop="@dimen/spacing_normal" + android:layout_gravity="center" + android:text="@string/follow" + android:textColor="@color/white" + android:visibility="gone" + tools:visibility="visible"/> - + - + + + + + android:orientation="vertical"> - + android:layout_marginTop="@dimen/spacing_xs_large" + android:layout_marginBottom="@dimen/spacing_xs_large" + android:drawablePadding="@dimen/spacing_xs_large" + android:drawableStart="@drawable/ic_group" + tools:text="Cum classis nocere"/> - + - + + + + + + + + + + + + + + + + + + + + + + + + android:orientation="vertical" + app:layoutManager="@string/grid_layout_manager" + app:spanCount="3" + tools:listitem="@layout/profile_org_row_item"/> - + - - + + + + + + + @@ -274,4 +327,6 @@ + + \ No newline at end of file