Skip to content

Commit

Permalink
Update v4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeRooo committed Apr 6, 2020
1 parent c1df6b4 commit 63e37f9
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 24 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ _This app is based on Toffeed by JakeLane (https://github.com/JakeLane/Toffeed).
- Translated to Breton by Irriep Nala Novram.
- Translated to Ukranian by sfilmak.

**Version 4.0.1:**
- Fixed some visual glitches.
- Copy & paste feature restored.

**Notes:**
_- Maybe some gifs cant be loaded because i need to add the url to the code. Report it as issue with the Facebook´s page link or website._

Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId "me.zeerooo.materialfb"
minSdkVersion 17
targetSdkVersion 29
versionCode 72
versionName "4.0.0"
versionCode 73
versionName "4.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down Expand Up @@ -45,7 +45,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation 'androidx.test:runner:1.3.0-alpha05'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha05'
implementation 'androidx.appcompat:appcompat:1.2.0-alpha03'
implementation 'androidx.appcompat:appcompat:1.2.0-beta01'
implementation "androidx.preference:preference:1.1.0"
implementation 'com.google.android.material:material:1.2.0-alpha05'
implementation 'org.jsoup:jsoup:1.13.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public void setContentView(int layoutResID) {

themeMode = getThemeMode();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && themeMode == 3)
getWindow().getDecorView().setSystemUiVisibility(getWindow().getDecorView().getSystemUiVisibility() |View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && (themeMode == 2 || themeMode == 3))
getWindow().getDecorView().setSystemUiVisibility(getWindow().getDecorView().getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

super.setContentView(layoutResID);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
import androidx.core.view.ViewCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkManager;

import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.button.MaterialButton;
Expand All @@ -87,7 +85,6 @@
import me.zeeroooo.materialfb.misc.DatabaseHelper;
import me.zeeroooo.materialfb.misc.ModelBookmarks;
import me.zeeroooo.materialfb.misc.UserInfo;
import me.zeeroooo.materialfb.notifications.NotificationsService;
import me.zeeroooo.materialfb.ui.CookingAToast;
import me.zeeroooo.materialfb.ui.MFBFloatingActionButton;
import me.zeeroooo.materialfb.ui.MFBResources;
Expand Down Expand Up @@ -155,9 +152,12 @@ protected void create(Bundle savedInstanceState) {
// Setup the DrawLayout
final ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, mToolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);

if (themeMode == 0) {
if (themeMode == 0 | themeMode == 1) {
toggle.getDrawerArrowDrawable().setColor(Color.WHITE);
mToolbar.setTitleTextColor(Color.WHITE);
} else if (themeMode == 2) {
toggle.getDrawerArrowDrawable().setColor(Color.BLACK);
mToolbar.setTitleTextColor(Color.BLACK);
}

MFB.textColor = toggle.getDrawerArrowDrawable().getColor();
Expand Down Expand Up @@ -185,7 +185,7 @@ protected void create(Bundle savedInstanceState) {

// Start the Swipe to reload listener
swipeView = findViewById(R.id.swipeLayout);
if (themeMode == 0)
if (themeMode == 0 | themeMode == 1)
swipeView.setColorSchemeResources(android.R.color.white);
else
swipeView.setColorSchemeResources(android.R.color.black);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ protected void create(Bundle savedInstanceState) {

final Drawable backArrowDrawable = getResources().getDrawable(R.drawable.abc_ic_ab_back_material);

if (themeMode == 0) {
mToolbar.setTitleTextColor(MFB.textColor);
backArrowDrawable.setColorFilter(MFB.textColor, PorterDuff.Mode.SRC_ATOP);
}
mToolbar.setTitleTextColor(MFB.textColor);
backArrowDrawable.setColorFilter(MFB.textColor, PorterDuff.Mode.SRC_ATOP);

setSupportActionBar(mToolbar);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public boolean onPreferenceClick(Preference preference) {
colorPrimary = Color.rgb(red, green, blue);
int colorAccent;

if (ColorUtils.calculateLuminance(colorPrimary) > 0.8) // it's too bright
if (ColorUtils.calculateLuminance(colorPrimary) > 0.8 || (ColorUtils.calculateLuminance(MFB.colorPrimary) < 0.5 && switchMaterial.isChecked())) // it's too bright
colorAccent = Color.BLACK;
else if (ColorUtils.calculateLuminance(colorPrimary) < 0.01 && switchMaterial.isChecked()) // it's too dark
colorAccent = Color.WHITE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import androidx.annotation.NonNull;
Expand Down Expand Up @@ -74,7 +73,7 @@ public void addButton(Drawable icon, String description, int size, OnClickListen
floatingActionButton = new FloatingActionButton(getContext());
floatingActionButton.setImageDrawable(icon);
floatingActionButton.setBackgroundTintList(ColorStateList.valueOf(MFB.colorAccent));
floatingActionButton.setColorFilter(MFB.textColor);
floatingActionButton.setColorFilter(MFB.colorAccent == Color.WHITE ? MFB.colorPrimary : Color.WHITE);
floatingActionButton.setOnClickListener(onClickListener);
floatingActionButton.setSize(size);
floatingActionButton.setContentDescription(description);
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/zeeroooo/materialfb/webview/Helpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public static String cssThemeEngine(byte themeMode) {
if (themeMode == 1 || themeMode == 3)
stringBuilder.append("._34em ._34ee, .touch ._8hq8, ._6j_d ._6j_c, ._59tg, ._u42 ._55fj { color: #").append(Integer.toHexString(MFB.colorAccent).substring(2)).append(" !important; }");

stringBuilder.append("._5rgr, ._5rgt p { -webkit-user-select: initial !important; }");

return stringBuilder.toString();
}
}
12 changes: 6 additions & 6 deletions app/src/main/res/layout/activity_video.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<VideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />

<RelativeLayout
android:id="@+id/buttons_header"
android:layout_width="match_parent"
Expand Down Expand Up @@ -75,10 +81,4 @@

</RelativeLayout>

<VideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />

</merge>
7 changes: 7 additions & 0 deletions app/src/main/res/values/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
<resources>
<string name="changelog_list" translatable="false">
<![CDATA[
<b>**Version 4.0.1:**</b>
<br>
- Fixed some visual glitches.
<br>
- Copy & paste feature restored.
<br>
<br>
<b>**Version 4.0.0:**</b>
<br>
- Added color picker.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.android.tools.build:gradle:3.6.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 63e37f9

Please sign in to comment.