mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #1739 from nextcloud/paintWhatsNew
Paint whats new: use fontColor for brander
This commit is contained in:
commit
cb3224144a
2 changed files with 17 additions and 4 deletions
|
@ -1,21 +1,21 @@
|
|||
/**
|
||||
/*
|
||||
* Nextcloud Android client application
|
||||
*
|
||||
* @author Bartosz Przybylski
|
||||
* Copyright (C) 2015 Bartosz Przybylski
|
||||
* Copyright (C) 2015 ownCloud Inc.
|
||||
* Copyright (C) 2016 Nextcloud.
|
||||
* <p>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
* <p>
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
* <p>
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@ -55,6 +55,7 @@ import com.owncloud.android.features.FeatureList;
|
|||
import com.owncloud.android.features.FeatureList.FeatureItem;
|
||||
import com.owncloud.android.ui.whatsnew.ProgressIndicator;
|
||||
import com.owncloud.android.utils.AnalyticsUtils;
|
||||
import com.owncloud.android.utils.ThemeUtils;
|
||||
|
||||
/**
|
||||
* Activity displaying general feature after a fresh install and new features after an update.
|
||||
|
@ -77,6 +78,8 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.whats_new_activity);
|
||||
|
||||
int fontColor = ThemeUtils.fontColor();
|
||||
|
||||
mProgress = (ProgressIndicator) findViewById(R.id.progressIndicator);
|
||||
mPager = (ViewPager) findViewById(R.id.contentPanel);
|
||||
final boolean isBeta = getResources().getBoolean(R.bool.is_beta);
|
||||
|
@ -108,6 +111,8 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
|||
|
||||
|
||||
mForwardFinishButton = (ImageButton) findViewById(R.id.forward);
|
||||
ThemeUtils.colorImageButton(mForwardFinishButton, fontColor);
|
||||
|
||||
mForwardFinishButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -129,6 +134,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
|||
}
|
||||
|
||||
mSkipButton = (Button) findViewById(R.id.skip);
|
||||
mSkipButton.setTextColor(fontColor);
|
||||
mSkipButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -326,6 +332,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
|||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View v = inflater.inflate(R.layout.whats_new_element, container, false);
|
||||
int fontColor = ThemeUtils.fontColor();
|
||||
|
||||
ImageView iv = (ImageView) v.findViewById(R.id.whatsNewImage);
|
||||
if (mItem.shouldShowImage()) {
|
||||
|
@ -335,11 +342,13 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
|||
TextView tv2 = (TextView) v.findViewById(R.id.whatsNewTitle);
|
||||
if (mItem.shouldShowTitleText()) {
|
||||
tv2.setText(mItem.getTitleText());
|
||||
tv2.setTextColor(fontColor);
|
||||
}
|
||||
|
||||
tv2 = (TextView) v.findViewById(R.id.whatsNewText);
|
||||
if (mItem.shouldShowContentText()) {
|
||||
tv2.setText(mItem.getContentText());
|
||||
tv2.setTextColor(fontColor);
|
||||
|
||||
if (!mItem.shouldContentCentered()) {
|
||||
tv2.setGravity(Gravity.START);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
package com.owncloud.android.ui.whatsnew;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.TransitionDrawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
|
@ -32,6 +33,7 @@ import android.widget.ImageView;
|
|||
import android.widget.LinearLayout;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.utils.ThemeUtils;
|
||||
|
||||
/**
|
||||
* Progress indicator visualizing the actual progress with dots.
|
||||
|
@ -63,11 +65,13 @@ public class ProgressIndicator extends FrameLayout {
|
|||
}
|
||||
|
||||
public void setNumberOfSteps(int steps) {
|
||||
int fontColor = ThemeUtils.fontColor();
|
||||
mNumberOfSteps = steps;
|
||||
mDotsContainer.removeAllViews();
|
||||
for (int i = 0; i < steps; ++i) {
|
||||
ImageView iv = new ImageView(getContext());
|
||||
iv.setImageDrawable(getContext().getResources().getDrawable(R.drawable.whats_new_progress_transition));
|
||||
iv.setColorFilter(fontColor, PorterDuff.Mode.SRC_ATOP);
|
||||
mDotsContainer.addView(iv);
|
||||
}
|
||||
animateToStep(1);
|
||||
|
|
Loading…
Reference in a new issue