diff --git a/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/AdaptiveRatingFragment.kt b/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/AdaptiveRatingFragment.kt index 5f5d02c832..985f596181 100644 --- a/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/AdaptiveRatingFragment.kt +++ b/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/AdaptiveRatingFragment.kt @@ -10,6 +10,7 @@ import android.view.ViewGroup import android.widget.AdapterView import android.widget.ArrayAdapter import kotlinx.android.synthetic.main.fragment_adaptive_rating.* +import kotlinx.android.synthetic.main.error_no_connection_with_button.* import org.stepic.droid.R import org.stepic.droid.adaptive.ui.adapters.AdaptiveRatingAdapter import org.stepic.droid.base.App @@ -47,7 +48,7 @@ class AdaptiveRatingFragment: FragmentBase(), AdaptiveRatingView { override fun onViewCreated(view: View?, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - + error.setBackgroundColor(ContextCompat.getColor(context, android.R.color.transparent)) recycler.layoutManager = LinearLayoutManager(context) val divider = DividerItemDecoration(context, DividerItemDecoration.VERTICAL) diff --git a/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/RecommendationsFragment.kt b/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/RecommendationsFragment.kt index 0f16b8da9c..aaa7ea7bbb 100644 --- a/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/RecommendationsFragment.kt +++ b/app/src/main/java/org/stepic/droid/adaptive/ui/fragments/RecommendationsFragment.kt @@ -7,6 +7,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.PopupWindow +import kotlinx.android.synthetic.main.error_no_connection_with_button.* import kotlinx.android.synthetic.main.fragment_recommendations.* import org.stepic.droid.R import org.stepic.droid.adaptive.ui.adapters.QuizCardsAdapter @@ -67,6 +68,7 @@ class RecommendationsFragment : FragmentBase(), RecommendationsView { override fun onViewCreated(view: View?, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + error.setBackgroundColor(ContextCompat.getColor(context, android.R.color.transparent)) tryAgain.setOnClickListener { recommendationsPresenter.retry() diff --git a/app/src/main/java/org/stepic/droid/base/CoursesDatabaseFragmentBase.java b/app/src/main/java/org/stepic/droid/base/CoursesDatabaseFragmentBase.java index 4ee4cd60d8..023d721ef3 100644 --- a/app/src/main/java/org/stepic/droid/base/CoursesDatabaseFragmentBase.java +++ b/app/src/main/java/org/stepic/droid/base/CoursesDatabaseFragmentBase.java @@ -137,7 +137,6 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) { public void showEmptyScreen(boolean isShown) { if (isShown) { if (getCourseType() == Table.enrolled) { - setBackgroundColorToRootView(R.color.old_cover); emptyCoursesView.setVisibility(View.VISIBLE); if (getSharedPreferenceHelper().getAuthResponseFromStore() != null) { //// TODO: 23.12.16 optimize it and do on background thread //logged @@ -150,13 +149,11 @@ public void showEmptyScreen(boolean isShown) { } emptySearch.setVisibility(View.GONE); } else { - setBackgroundColorToRootView(R.color.old_cover); emptyCoursesView.setVisibility(View.GONE); emptySearch.setVisibility(View.VISIBLE); } swipeRefreshLayout.setVisibility(View.GONE); } else { - setBackgroundColorToRootView(R.color.new_cover); emptySearch.setVisibility(View.GONE); emptyCoursesView.setVisibility(View.GONE); swipeRefreshLayout.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/org/stepic/droid/core/presenters/NotificationListPresenter.kt b/app/src/main/java/org/stepic/droid/core/presenters/NotificationListPresenter.kt index 87c9513744..7bb7124d05 100644 --- a/app/src/main/java/org/stepic/droid/core/presenters/NotificationListPresenter.kt +++ b/app/src/main/java/org/stepic/droid/core/presenters/NotificationListPresenter.kt @@ -92,6 +92,9 @@ class NotificationListPresenter } return false } else { + if (!isLoading) { + view?.onNeedShowNotifications(notificationList) + } //do nothing we loading or already loaded return true } diff --git a/app/src/main/java/org/stepic/droid/ui/adapters/NotificationAdapter.java b/app/src/main/java/org/stepic/droid/ui/adapters/NotificationAdapter.java index 4de3e725d5..3199386f2d 100644 --- a/app/src/main/java/org/stepic/droid/ui/adapters/NotificationAdapter.java +++ b/app/src/main/java/org/stepic/droid/ui/adapters/NotificationAdapter.java @@ -87,6 +87,7 @@ public int getNotificationsCount() { @Override public GenericViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { Timber.d("createViewHolder of NotificationAdapter, viewType = %d", viewType); + final Context context = parent.getContext(); if (viewType == HEADER_VIEW_TYPE) { View view = LayoutInflater.from(context).inflate(R.layout.notification_list_header_item, parent, false); return new HeaderViewHolder(view); @@ -190,7 +191,7 @@ public long getHeaderId(int position) { @NotNull @Override public DateHeaderViewHolder onCreateHeaderViewHolder(@NotNull ViewGroup parent) { - return new DateHeaderViewHolder(LayoutInflater.from(context).inflate(R.layout.notification_date_header, parent, false)); + return new DateHeaderViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.notification_date_header, parent, false)); } @Override @@ -334,7 +335,7 @@ private void setCommentNotificationIcon(Notification notification) { .load(avatarUri) .into(notificationIcon); } else { - Glide.with(context) + Glide.with(context.getApplicationContext()) .load(userAvatarUrl) .asBitmap() .placeholder(placeholderUserIcon) diff --git a/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableEnhancedFrameLayout.java b/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableEnhancedFrameLayout.java index 23a0148ed1..4676f879cb 100644 --- a/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableEnhancedFrameLayout.java +++ b/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableEnhancedFrameLayout.java @@ -13,6 +13,7 @@ import android.widget.FrameLayout; import android.widget.TextView; +import org.jetbrains.annotations.Contract; import org.stepic.droid.R; import org.stepic.droid.base.App; import org.stepic.droid.core.ScreenManager; @@ -67,16 +68,19 @@ public LatexSupportableEnhancedFrameLayout(Context context, AttributeSet attrs) } @LayoutRes + @Contract(pure = true) protected int getViewRes() { return R.layout.latex_supportabe_enhanced_view; } @IdRes + @Contract(pure = true) protected int getTextViewId() { return R.id.textView; } @IdRes + @Contract(pure = true) protected int getWebViewId() { return R.id.webView; } diff --git a/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableExpandableFrameLayout.kt b/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableExpandableFrameLayout.kt index af95bba246..442ef31b1f 100644 --- a/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableExpandableFrameLayout.kt +++ b/app/src/main/java/org/stepic/droid/ui/custom/LatexSupportableExpandableFrameLayout.kt @@ -2,12 +2,18 @@ package org.stepic.droid.ui.custom import android.util.AttributeSet import android.content.Context +import org.jetbrains.annotations.Contract import org.stepic.droid.R class LatexSupportableExpandableFrameLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null): LatexSupportableEnhancedFrameLayout(context, attrs) { + @Contract(pure = true) override fun getViewRes() = R.layout.latex_supportable_expandable_view + + @Contract(pure = true) override fun getTextViewId() = R.id.expandableTextView + + @Contract(pure = true) override fun getWebViewId() = R.id.htmlView } \ No newline at end of file diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/CertificatesFragment.kt b/app/src/main/java/org/stepic/droid/ui/fragments/CertificatesFragment.kt index acb9f3f640..31cdf62afe 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/CertificatesFragment.kt +++ b/app/src/main/java/org/stepic/droid/ui/fragments/CertificatesFragment.kt @@ -10,9 +10,9 @@ import android.view.View import android.view.ViewGroup import kotlinx.android.synthetic.main.empty_certificates.* import kotlinx.android.synthetic.main.fragment_certificates.* -import kotlinx.android.synthetic.main.need_auth_placeholder.* +import kotlinx.android.synthetic.main.empty_login.* import kotlinx.android.synthetic.main.progress_bar_on_empty_screen.* -import kotlinx.android.synthetic.main.report_problem_layout.* +import kotlinx.android.synthetic.main.error_no_connection.* import org.stepic.droid.R import org.stepic.droid.base.App import org.stepic.droid.base.FragmentBase @@ -72,6 +72,8 @@ class CertificatesFragment : FragmentBase(), authAction.setOnClickListener { screenManager.showLaunchScreen(activity) } + goToCatalog.setOnClickListener { screenManager.showCatalog(activity) } + certificateSwipeRefresh.setOnRefreshListener(this) certificatePresenter.attachView(this) diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/CommentsFragment.kt b/app/src/main/java/org/stepic/droid/ui/fragments/CommentsFragment.kt index d5df4d0b18..85924347b6 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/CommentsFragment.kt +++ b/app/src/main/java/org/stepic/droid/ui/fragments/CommentsFragment.kt @@ -16,8 +16,8 @@ import android.view.* import android.widget.Toast import kotlinx.android.synthetic.main.empty_comments.* import kotlinx.android.synthetic.main.fragment_comments.* -import kotlinx.android.synthetic.main.internet_fail_clickable.* import kotlinx.android.synthetic.main.progress_bar_on_empty_screen.* +import kotlinx.android.synthetic.main.error_no_connection.* import org.stepic.droid.R import org.stepic.droid.analytic.Analytic import org.stepic.droid.base.App diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/CourseDetailFragment.java b/app/src/main/java/org/stepic/droid/ui/fragments/CourseDetailFragment.java index be4a204c71..4876058a9f 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/CourseDetailFragment.java +++ b/app/src/main/java/org/stepic/droid/ui/fragments/CourseDetailFragment.java @@ -112,6 +112,9 @@ public static CourseDetailFragment newInstance(long courseId) { @BindView(R.id.course_not_found) View courseNotFoundView; + @BindView(R.id.goToCatalog) + View goToCatalog; + @BindDrawable(R.drawable.general_placeholder) Drawable coursePlaceholder; @@ -139,8 +142,11 @@ public static CourseDetailFragment newInstance(long courseId) { @BindDrawable(R.drawable.video_placeholder_drawable) Drawable videoPlaceholder; - @BindView(R.id.reportProblem) - View reportInternetProblem; + @BindView(R.id.error) + View errorView; + + @BindView(R.id.tryAgain) + View tryAgain; ImageView courseIcon; @@ -215,7 +221,7 @@ public void onViewCreated(View view, Bundle savedInstanceState) { hideSoftKeypad(); instructorAdapter = new InstructorAdapter(instructorsList, getActivity()); instructorsCarousel.setAdapter(instructorAdapter); - courseNotFoundView.setOnClickListener(new View.OnClickListener() { + goToCatalog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (getSharedPreferenceHelper().getAuthResponseFromStore() != null) { @@ -242,7 +248,7 @@ public void onClick(View v) { tryToShowCourse(); } }; - reportInternetProblem.setOnClickListener(onClickReportListener); + tryAgain.setOnClickListener(onClickReportListener); header.setVisibility(View.GONE); //hide while we don't have the course footer.setVisibility(View.GONE); @@ -277,7 +283,7 @@ private void initFooter(LayoutInflater layoutInflater) { private void tryToShowCourse() { - reportInternetProblem.setVisibility(View.GONE); // now we try show -> it is not visible + errorView.setVisibility(View.GONE); // now we try show -> it is not visible course = getArguments().getParcelable(AppConstants.KEY_COURSE_BUNDLE); if (course == null) { //it is not from our activity @@ -306,7 +312,7 @@ public void onCourseFound(@NotNull Course foundCourse) { public void initScreenByCourse() { //todo HIDE LOADING AND ERRORS - reportInternetProblem.setVisibility(View.GONE); + errorView.setVisibility(View.GONE); courseNotFoundView.setVisibility(View.GONE); // header.setVisibility(View.VISIBLE); @@ -432,7 +438,7 @@ public void onClick(View v) { public void onCourseUnavailable(long courseId) { if (course == null) { getAnalytic().reportEvent(Analytic.Interaction.COURSE_USER_TRY_FAIL, courseId + ""); - reportInternetProblem.setVisibility(View.GONE); + errorView.setVisibility(View.GONE); courseNotFoundView.setVisibility(View.VISIBLE); } } @@ -441,8 +447,8 @@ public void onCourseUnavailable(long courseId) { public void onInternetFailWhenCourseIsTriedToLoad() { if (course == null) { courseNotFoundView.setVisibility(View.GONE); - reportInternetProblem.setVisibility(View.VISIBLE); - reportInternetProblem.setOnClickListener(onClickReportListener); + errorView.setVisibility(View.VISIBLE); + tryAgain.setOnClickListener(onClickReportListener); } } @@ -497,8 +503,8 @@ public void onDestroyView() { courseJoinerPresenter.detachView(this); courseFinderPresenter.detachView(this); courseDetailAnalyticPresenter.detachView(this); - reportInternetProblem.setOnClickListener(null); - courseNotFoundView.setOnClickListener(null); + tryAgain.setOnClickListener(null); + goToCatalog.setOnClickListener(null); instructorAdapter = null; joinCourseView.setOnClickListener(null); continueCourseView.setOnClickListener(null); diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/CourseListFragmentBase.java b/app/src/main/java/org/stepic/droid/ui/fragments/CourseListFragmentBase.java index afc99146e6..6ba322b956 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/CourseListFragmentBase.java +++ b/app/src/main/java/org/stepic/droid/ui/fragments/CourseListFragmentBase.java @@ -2,7 +2,6 @@ import android.app.Activity; import android.os.Bundle; -import android.support.annotation.ColorRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; @@ -91,6 +90,9 @@ public abstract class CourseListFragmentBase extends FragmentBase @BindView(R.id.empty_search) protected ViewGroup emptySearch; + @BindView(R.id.goToCatalog) + protected Button goToCatalog; + protected List courses; protected CoursesAdapter coursesAdapter; @@ -177,18 +179,26 @@ public void onClick(View v) { public void onClick(View v) { Activity parent = getActivity(); if (parent == null || !(parent instanceof RootScreen)) { - return; - } - getAnalytic().reportEvent(Analytic.Interaction.CLICK_FIND_COURSE_EMPTY_SCREEN); - if (getSharedPreferenceHelper().getAuthResponseFromStore() == null) { - getAnalytic().reportEvent(Analytic.Anonymous.BROWSE_COURSES_CENTER); + getScreenManager().showCatalog(getContext()); + } else { + getAnalytic().reportEvent(Analytic.Interaction.CLICK_FIND_COURSE_EMPTY_SCREEN); + if (getSharedPreferenceHelper().getAuthResponseFromStore() == null) { + getAnalytic().reportEvent(Analytic.Anonymous.BROWSE_COURSES_CENTER); + } + ((RootScreen) parent).showCatalog(); } - ((RootScreen) parent).showCatalog(); } }); joiningListenerClient.subscribe(this); continueCoursePresenter.attachView(this); droppingPresenter.attachView(this); + + goToCatalog.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + screenManager.showCatalog(getContext()); + } + }); } @Override @@ -234,7 +244,6 @@ public void showLoading() { reportConnectionProblem.setVisibility(View.GONE); if (courses.isEmpty()) { - setBackgroundColorToRootView(R.color.new_cover); ProgressHelper.activate(swipeRefreshLayout); coursesAdapter.showLoadingFooter(false); } else if (swipeRefreshLayout != null && !swipeRefreshLayout.isRefreshing()) { @@ -252,7 +261,6 @@ public void showEmptyCourses() { ProgressHelper.dismiss(swipeRefreshLayout); reportConnectionProblem.setVisibility(View.GONE); if (courses.isEmpty()) { - setBackgroundColorToRootView(R.color.old_cover); showEmptyScreen(true); getLocalReminder().remindAboutApp(); } @@ -267,7 +275,6 @@ public void showConnectionProblem() { if (courses == null || courses.isEmpty()) { //screen is clear due to error connection showEmptyScreen(false); - setBackgroundColorToRootView(R.color.old_cover); reportConnectionProblem.setVisibility(View.VISIBLE); } } @@ -277,7 +284,6 @@ public final void showCourses(@NonNull List courses) { ProgressHelper.dismiss(progressBarOnEmptyScreen); ProgressHelper.dismiss(swipeRefreshLayout); coursesAdapter.showLoadingFooter(false); - setBackgroundColorToRootView(R.color.new_cover); reportConnectionProblem.setVisibility(View.GONE); showEmptyScreen(false); List finalCourses; @@ -338,10 +344,6 @@ public void onSuccessJoin(@Nullable Course joinedCourse) { updateEnrollment(joinedCourse, joinedCourse.getEnrollment()); } - protected final void setBackgroundColorToRootView(@ColorRes int colorRes) { - rootView.setBackgroundColor(ColorUtil.INSTANCE.getColorArgb(colorRes, getContext())); - } - @Override public final void onUserHasNotPermissionsToDrop() { Toast.makeText(getContext(), R.string.cant_drop, Toast.LENGTH_SHORT).show(); diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/DownloadsFragment.java b/app/src/main/java/org/stepic/droid/ui/fragments/DownloadsFragment.java index 5b43646ff7..dac202d815 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/DownloadsFragment.java +++ b/app/src/main/java/org/stepic/droid/ui/fragments/DownloadsFragment.java @@ -90,6 +90,9 @@ public static DownloadsFragment newInstance() { @BindView(R.id.authAction) Button authUserButton; + @BindView(R.id.goToCatalog) + Button goToCatalog; + private DownloadsAdapter downloadAdapter; private List cachedVideoList; private ConcurrentHashMap stepIdToLesson; @@ -164,6 +167,13 @@ public void onClick(View v) { ProgressHelper.activate(progressBar); } + goToCatalog.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + screenManager.showCatalog(getContext()); + } + }); + loadingProgressDialog = new LoadingProgressDialog(getContext()); downloadsListenerClient.subscribe(this); videoMovedListenerClient.subscribe(this); diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/LessonFragment.java b/app/src/main/java/org/stepic/droid/ui/fragments/LessonFragment.java index 87839abe4e..515050ca1d 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/LessonFragment.java +++ b/app/src/main/java/org/stepic/droid/ui/fragments/LessonFragment.java @@ -124,12 +124,18 @@ public static LessonFragment newInstance(long simpleUnitId, long simpleLessonId, @BindView(R.id.loadProgressbarOnEmptyScreen) ProgressBar progressBar; - @BindView(R.id.reportProblem) - View reportProblem; + @BindView(R.id.error) + View errorView; + + @BindView(R.id.tryAgain) + View tryAgain; @BindView(R.id.corrupted_lesson) View corruptedLesson; + @BindView(R.id.goToCatalog) + View goToCatalog; + @BindView(R.id.authAction) View authActionView; @@ -180,6 +186,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); + if (savedInstanceState != null) { isRestarted = true; } @@ -221,7 +228,7 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { private void initIndependentUI() { viewPager.addOnPageChangeListener(pageChangeListener); - reportProblem.setOnClickListener(new View.OnClickListener() { + tryAgain.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Section section = getArguments().getParcelable(AppConstants.KEY_SECTION_BUNDLE); @@ -243,6 +250,12 @@ public void onClick(View v) { getActivity().finish(); } }); + goToCatalog.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + getScreenManager().showCatalog(getActivity()); + } + }); } private void init(Lesson lesson) { @@ -261,7 +274,7 @@ public void onDestroyView() { if (pageChangeListener != null) { viewPager.removeOnPageChangeListener(pageChangeListener); } - reportProblem.setOnClickListener(null); + tryAgain.setOnClickListener(null); super.onDestroyView(); } @@ -382,7 +395,7 @@ public boolean onOptionsItemSelected(MenuItem item) { @Override public void onLessonCorrupted() { ProgressHelper.dismiss(progressBar); - reportProblem.setVisibility(View.GONE); + errorView.setVisibility(View.GONE); authView.setVisibility(View.GONE); emptySteps.setVisibility(View.GONE); showViewPager(false); @@ -405,7 +418,7 @@ public void onConnectionProblem() { emptySteps.setVisibility(View.GONE); showViewPager(false); if (stepsPresenter.getStepList().isEmpty()) { - reportProblem.setVisibility(View.VISIBLE); + errorView.setVisibility(View.VISIBLE); } else { Toast.makeText(getActivity(), connectionProblemString, Toast.LENGTH_LONG).show(); } @@ -414,7 +427,7 @@ public void onConnectionProblem() { @Override public void showSteps(boolean fromPreviousLesson, long defaultStepPosition) { ProgressHelper.dismiss(progressBar); - reportProblem.setVisibility(View.GONE); + errorView.setVisibility(View.GONE); corruptedLesson.setVisibility(View.GONE); authView.setVisibility(View.GONE); emptySteps.setVisibility(View.GONE); @@ -456,7 +469,7 @@ public boolean onPreDraw() { @Override public void onEmptySteps() { ProgressHelper.dismiss(progressBar); - reportProblem.setVisibility(View.GONE); + errorView.setVisibility(View.GONE); corruptedLesson.setVisibility(View.GONE); authView.setVisibility(View.GONE); emptySteps.setVisibility(View.VISIBLE); @@ -468,7 +481,7 @@ public void onLoading() { if (stepsPresenter.getStepList().isEmpty()) { ProgressHelper.activate(progressBar); } - reportProblem.setVisibility(View.GONE); + errorView.setVisibility(View.GONE); corruptedLesson.setVisibility(View.GONE); authView.setVisibility(View.GONE); emptySteps.setVisibility(View.GONE); @@ -478,7 +491,7 @@ public void onLoading() { @Override public void onUserNotAuth() { ProgressHelper.dismiss(progressBar); - reportProblem.setVisibility(View.GONE); + errorView.setVisibility(View.GONE); corruptedLesson.setVisibility(View.GONE); emptySteps.setVisibility(View.GONE); authView.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/NotificationListFragment.java b/app/src/main/java/org/stepic/droid/ui/fragments/NotificationListFragment.java index 19ad70b3fe..19e82dcdfc 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/NotificationListFragment.java +++ b/app/src/main/java/org/stepic/droid/ui/fragments/NotificationListFragment.java @@ -11,6 +11,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.Button; import org.jetbrains.annotations.NotNull; import org.stepic.droid.R; @@ -66,6 +67,9 @@ public static NotificationListFragment newInstance(int categoryPosition) { @BindView(R.id.empty_notifications) View emptyNotifications; + @BindView(R.id.goToCatalog) + Button goToCatalog; + @BindView(R.id.notification_swipe_refresh) StepikSwipeRefreshLayout notificationSwipeRefresh; @@ -141,6 +145,13 @@ public void onScrolled(RecyclerView recyclerView, int dx, int dy) { }; notificationRecyclerView.addOnScrollListener(recyclerViewScrollListener); + goToCatalog.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + screenManager.showCatalog(getContext()); + } + }); + notificationListPresenter.attachView(this); notificationListPresenter.init(notificationCategory); } diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/ProfileFragment.kt b/app/src/main/java/org/stepic/droid/ui/fragments/ProfileFragment.kt index f37b5bca13..f0cff112e7 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/ProfileFragment.kt +++ b/app/src/main/java/org/stepic/droid/ui/fragments/ProfileFragment.kt @@ -12,7 +12,7 @@ import com.bumptech.glide.Glide import com.bumptech.glide.load.engine.DiskCacheStrategy import kotlinx.android.synthetic.main.fragment_profile_new.* import kotlinx.android.synthetic.main.latex_supportabe_enhanced_view.view.* -import kotlinx.android.synthetic.main.need_auth_placeholder.* +import kotlinx.android.synthetic.main.empty_login.* import kotlinx.android.synthetic.main.view_notification_interval_chooser.* import org.stepic.droid.R import org.stepic.droid.analytic.Analytic diff --git a/app/src/main/java/org/stepic/droid/ui/fragments/SectionsFragment.java b/app/src/main/java/org/stepic/droid/ui/fragments/SectionsFragment.java index 7903e77b03..1a9faeb6f1 100644 --- a/app/src/main/java/org/stepic/droid/ui/fragments/SectionsFragment.java +++ b/app/src/main/java/org/stepic/droid/ui/fragments/SectionsFragment.java @@ -139,6 +139,9 @@ public static SectionsFragment newInstance() { @BindView(R.id.course_not_found) View courseNotParsedView; + @BindView(R.id.goToCatalog) + View goToCatalog; + @BindView(R.id.report_empty) protected View reportEmptyView; @@ -506,7 +509,7 @@ public void onDestroyView() { invitationPresenter.detachView(this); storeStateManager.removeSectionCallback(this); droppingListenerClient.unsubscribe(this); - courseNotParsedView.setOnClickListener(null); + goToCatalog.setOnClickListener(null); swipeRefreshLayout.setOnRefreshListener(null); localProgressManager.unsubscribe(this); downloadingPresenter.detachView(this); @@ -592,7 +595,7 @@ public void onCourseUnavailable(long courseId) { if (course == null) { ProgressHelper.dismiss(swipeRefreshLayout); ProgressHelper.dismiss(loadOnCenterProgressBar); - courseNotParsedView.setOnClickListener(new View.OnClickListener() { + goToCatalog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (getSharedPreferenceHelper().getAuthResponseFromStore() != null) { diff --git a/app/src/main/res/drawable-hdpi/ic_empty.png b/app/src/main/res/drawable-hdpi/ic_empty.png new file mode 100644 index 0000000000..ce6e1aac54 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_empty.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_empty_courses_3.png b/app/src/main/res/drawable-hdpi/ic_empty_courses_3.png deleted file mode 100644 index 5dbe6805b8..0000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_empty_courses_3.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_empty_downloads.png b/app/src/main/res/drawable-hdpi/ic_empty_downloads.png new file mode 100644 index 0000000000..eeb8a6672d Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_empty_downloads.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_empty_downloads_2.png b/app/src/main/res/drawable-hdpi/ic_empty_downloads_2.png deleted file mode 100644 index f130b4ed4e..0000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_empty_downloads_2.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_empty_login.png b/app/src/main/res/drawable-hdpi/ic_empty_login.png new file mode 100644 index 0000000000..c32f29c8b6 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_empty_login.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_empty_notifications.png b/app/src/main/res/drawable-hdpi/ic_empty_notifications.png new file mode 100644 index 0000000000..2905e52746 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_empty_notifications.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_empty_search.png b/app/src/main/res/drawable-hdpi/ic_empty_search.png new file mode 100644 index 0000000000..3fbc228ca8 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_empty_search.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_no_wifi.png b/app/src/main/res/drawable-hdpi/ic_no_wifi.png index 997d70166b..0a9432578c 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_no_wifi.png and b/app/src/main/res/drawable-hdpi/ic_no_wifi.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_nocertificates_125.png b/app/src/main/res/drawable-hdpi/ic_nocertificates_125.png deleted file mode 100644 index 2ab7012905..0000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_nocertificates_125.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_nocomments.png b/app/src/main/res/drawable-hdpi/ic_nocomments.png deleted file mode 100644 index 68116f3e1a..0000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_nocomments.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_placeholder_auth_1.png b/app/src/main/res/drawable-hdpi/ic_placeholder_auth_1.png deleted file mode 100644 index 2851a6dff7..0000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_placeholder_auth_1.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_settings_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_settings_black_24dp.png deleted file mode 100644 index acf1ddf85b..0000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_settings_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/bt_signin_active.9.png b/app/src/main/res/drawable-mdpi/bt_signin_active.9.png deleted file mode 100644 index f5b22bc9ad..0000000000 Binary files a/app/src/main/res/drawable-mdpi/bt_signin_active.9.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_empty.png b/app/src/main/res/drawable-mdpi/ic_empty.png new file mode 100644 index 0000000000..7c76aadde4 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_empty.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_empty_courses_3.png b/app/src/main/res/drawable-mdpi/ic_empty_courses_3.png deleted file mode 100644 index dabf55ee0e..0000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_empty_courses_3.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_empty_downloads.png b/app/src/main/res/drawable-mdpi/ic_empty_downloads.png new file mode 100644 index 0000000000..5db8d42399 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_empty_downloads.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_empty_downloads_2.png b/app/src/main/res/drawable-mdpi/ic_empty_downloads_2.png deleted file mode 100644 index ad5fcd29a7..0000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_empty_downloads_2.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_empty_login.png b/app/src/main/res/drawable-mdpi/ic_empty_login.png new file mode 100644 index 0000000000..efa76ba472 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_empty_login.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_empty_notifications.png b/app/src/main/res/drawable-mdpi/ic_empty_notifications.png new file mode 100644 index 0000000000..269236f596 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_empty_notifications.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_empty_search.png b/app/src/main/res/drawable-mdpi/ic_empty_search.png new file mode 100644 index 0000000000..9e5fa28c05 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_empty_search.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_no_wifi.png b/app/src/main/res/drawable-mdpi/ic_no_wifi.png index cfb3b5e93e..591349de05 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_no_wifi.png and b/app/src/main/res/drawable-mdpi/ic_no_wifi.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_nocertificates_125.png b/app/src/main/res/drawable-mdpi/ic_nocertificates_125.png deleted file mode 100644 index cd3f4e8380..0000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_nocertificates_125.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_nocomments.png b/app/src/main/res/drawable-mdpi/ic_nocomments.png deleted file mode 100644 index 61563a3e00..0000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_nocomments.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_placeholder_auth_1.png b/app/src/main/res/drawable-mdpi/ic_placeholder_auth_1.png deleted file mode 100644 index a9e24c8398..0000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_placeholder_auth_1.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_settings_black_24dp.png b/app/src/main/res/drawable-mdpi/ic_settings_black_24dp.png deleted file mode 100644 index c59419c02b..0000000000 Binary files a/app/src/main/res/drawable-mdpi/ic_settings_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-v21/placeholder_button_background_selector.xml b/app/src/main/res/drawable-v21/placeholder_button_background_selector.xml new file mode 100644 index 0000000000..2345ec7c74 --- /dev/null +++ b/app/src/main/res/drawable-v21/placeholder_button_background_selector.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/ic_empty.png b/app/src/main/res/drawable-xhdpi/ic_empty.png new file mode 100644 index 0000000000..01bda115f6 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_empty.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_empty_courses_3.png b/app/src/main/res/drawable-xhdpi/ic_empty_courses_3.png deleted file mode 100644 index 95ec1e44ca..0000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_empty_courses_3.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_empty_downloads.png b/app/src/main/res/drawable-xhdpi/ic_empty_downloads.png new file mode 100644 index 0000000000..797e952469 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_empty_downloads.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_empty_downloads_2.png b/app/src/main/res/drawable-xhdpi/ic_empty_downloads_2.png deleted file mode 100644 index cfce15bfdd..0000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_empty_downloads_2.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_empty_login.png b/app/src/main/res/drawable-xhdpi/ic_empty_login.png new file mode 100644 index 0000000000..ab050c4658 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_empty_login.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_empty_notifications.png b/app/src/main/res/drawable-xhdpi/ic_empty_notifications.png new file mode 100644 index 0000000000..af798030c2 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_empty_notifications.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_empty_search.png b/app/src/main/res/drawable-xhdpi/ic_empty_search.png new file mode 100644 index 0000000000..e41e562184 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_empty_search.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_no_wifi.png b/app/src/main/res/drawable-xhdpi/ic_no_wifi.png index 885b6270d5..6a564edc77 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_no_wifi.png and b/app/src/main/res/drawable-xhdpi/ic_no_wifi.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_nocertificates_125.png b/app/src/main/res/drawable-xhdpi/ic_nocertificates_125.png deleted file mode 100644 index 71801ac06b..0000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_nocertificates_125.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_nocomments.png b/app/src/main/res/drawable-xhdpi/ic_nocomments.png deleted file mode 100644 index 34164a2422..0000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_nocomments.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_placeholder_auth_1.png b/app/src/main/res/drawable-xhdpi/ic_placeholder_auth_1.png deleted file mode 100644 index 3c45a3fb0c..0000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_placeholder_auth_1.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_settings_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_settings_black_24dp.png deleted file mode 100644 index e84e188a1d..0000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_settings_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_empty.png b/app/src/main/res/drawable-xxhdpi/ic_empty.png new file mode 100644 index 0000000000..2a4e32cad3 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_empty.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_empty_courses_3.png b/app/src/main/res/drawable-xxhdpi/ic_empty_courses_3.png deleted file mode 100644 index 3b6b93eae6..0000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_empty_courses_3.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_empty_downloads.png b/app/src/main/res/drawable-xxhdpi/ic_empty_downloads.png new file mode 100644 index 0000000000..5ca0fc8395 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_empty_downloads.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_empty_downloads_2.png b/app/src/main/res/drawable-xxhdpi/ic_empty_downloads_2.png deleted file mode 100644 index dbf6b25c50..0000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_empty_downloads_2.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_empty_login.png b/app/src/main/res/drawable-xxhdpi/ic_empty_login.png new file mode 100644 index 0000000000..8b024d5f9e Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_empty_login.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_empty_notifications.png b/app/src/main/res/drawable-xxhdpi/ic_empty_notifications.png new file mode 100644 index 0000000000..5ac3276ac8 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_empty_notifications.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_empty_search.png b/app/src/main/res/drawable-xxhdpi/ic_empty_search.png new file mode 100644 index 0000000000..762bdeae4f Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_empty_search.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_no_wifi.png b/app/src/main/res/drawable-xxhdpi/ic_no_wifi.png index 8f9cff9902..2c8a51932c 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_no_wifi.png and b/app/src/main/res/drawable-xxhdpi/ic_no_wifi.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_nocertificates_125.png b/app/src/main/res/drawable-xxhdpi/ic_nocertificates_125.png deleted file mode 100644 index 558cf10ba2..0000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_nocertificates_125.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_nocomments.png b/app/src/main/res/drawable-xxhdpi/ic_nocomments.png deleted file mode 100644 index 5e4847187f..0000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_nocomments.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_placeholder_auth_1.png b/app/src/main/res/drawable-xxhdpi/ic_placeholder_auth_1.png deleted file mode 100644 index 1424a624a7..0000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_placeholder_auth_1.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_settings_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_settings_black_24dp.png deleted file mode 100644 index 3023ff8daa..0000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_settings_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_empty.png b/app/src/main/res/drawable-xxxhdpi/ic_empty.png new file mode 100644 index 0000000000..98b166fdf8 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_empty.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_empty_courses_3.png b/app/src/main/res/drawable-xxxhdpi/ic_empty_courses_3.png deleted file mode 100644 index c3228a20c1..0000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_empty_courses_3.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_empty_downloads.png b/app/src/main/res/drawable-xxxhdpi/ic_empty_downloads.png new file mode 100644 index 0000000000..7684242b50 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_empty_downloads.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_empty_downloads_2.png b/app/src/main/res/drawable-xxxhdpi/ic_empty_downloads_2.png deleted file mode 100644 index 4ed05b5305..0000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_empty_downloads_2.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_empty_login.png b/app/src/main/res/drawable-xxxhdpi/ic_empty_login.png new file mode 100644 index 0000000000..587c28c809 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_empty_login.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_empty_notifications.png b/app/src/main/res/drawable-xxxhdpi/ic_empty_notifications.png new file mode 100644 index 0000000000..721bc1c110 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_empty_notifications.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_empty_search.png b/app/src/main/res/drawable-xxxhdpi/ic_empty_search.png new file mode 100644 index 0000000000..971d8aea89 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_empty_search.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_no_wifi.png b/app/src/main/res/drawable-xxxhdpi/ic_no_wifi.png index e0c3c3cc96..df39c35d67 100644 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_no_wifi.png and b/app/src/main/res/drawable-xxxhdpi/ic_no_wifi.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_nocertificates_125.png b/app/src/main/res/drawable-xxxhdpi/ic_nocertificates_125.png deleted file mode 100644 index ff5acbc790..0000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_nocertificates_125.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_nocomments.png b/app/src/main/res/drawable-xxxhdpi/ic_nocomments.png deleted file mode 100644 index 60d4fda727..0000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_nocomments.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_placeholder_auth_1.png b/app/src/main/res/drawable-xxxhdpi/ic_placeholder_auth_1.png deleted file mode 100644 index ac1e02f112..0000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_placeholder_auth_1.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_settings_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_settings_black_24dp.png deleted file mode 100644 index 476d5c9780..0000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_settings_black_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable/placeholder_button_background.xml b/app/src/main/res/drawable/placeholder_button_background.xml new file mode 100644 index 0000000000..675caadb1c --- /dev/null +++ b/app/src/main/res/drawable/placeholder_button_background.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/placeholder_button_background_pressed.xml b/app/src/main/res/drawable/placeholder_button_background_pressed.xml new file mode 100644 index 0000000000..97f3b36e56 --- /dev/null +++ b/app/src/main/res/drawable/placeholder_button_background_pressed.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/placeholder_button_background_selector.xml b/app/src/main/res/drawable/placeholder_button_background_selector.xml new file mode 100644 index 0000000000..4f9fb22771 --- /dev/null +++ b/app/src/main/res/drawable/placeholder_button_background_selector.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_certificates.xml b/app/src/main/res/layout-land/empty_certificates.xml new file mode 100644 index 0000000000..050b19659c --- /dev/null +++ b/app/src/main/res/layout-land/empty_certificates.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_comments.xml b/app/src/main/res/layout-land/empty_comments.xml new file mode 100644 index 0000000000..9640fed6e9 --- /dev/null +++ b/app/src/main/res/layout-land/empty_comments.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_courses.xml b/app/src/main/res/layout-land/empty_courses.xml new file mode 100644 index 0000000000..0a1b25192e --- /dev/null +++ b/app/src/main/res/layout-land/empty_courses.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_default.xml b/app/src/main/res/layout-land/empty_default.xml new file mode 100644 index 0000000000..cb35ad1ad1 --- /dev/null +++ b/app/src/main/res/layout-land/empty_default.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_downloading.xml b/app/src/main/res/layout-land/empty_downloading.xml new file mode 100644 index 0000000000..401155b82e --- /dev/null +++ b/app/src/main/res/layout-land/empty_downloading.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_login.xml b/app/src/main/res/layout-land/empty_login.xml new file mode 100644 index 0000000000..7c9557e539 --- /dev/null +++ b/app/src/main/res/layout-land/empty_login.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_notifications.xml b/app/src/main/res/layout-land/empty_notifications.xml new file mode 100644 index 0000000000..81321d2656 --- /dev/null +++ b/app/src/main/res/layout-land/empty_notifications.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_search.xml b/app/src/main/res/layout-land/empty_search.xml new file mode 100644 index 0000000000..cbf0ffb7ca --- /dev/null +++ b/app/src/main/res/layout-land/empty_search.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/empty_steps.xml b/app/src/main/res/layout-land/empty_steps.xml new file mode 100644 index 0000000000..c1d7a8dead --- /dev/null +++ b/app/src/main/res/layout-land/empty_steps.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/error_course_not_found.xml b/app/src/main/res/layout-land/error_course_not_found.xml new file mode 100644 index 0000000000..624da76558 --- /dev/null +++ b/app/src/main/res/layout-land/error_course_not_found.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/error_lesson_not_found.xml b/app/src/main/res/layout-land/error_lesson_not_found.xml new file mode 100644 index 0000000000..8c4adf1073 --- /dev/null +++ b/app/src/main/res/layout-land/error_lesson_not_found.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/error_no_connection.xml b/app/src/main/res/layout-land/error_no_connection.xml new file mode 100644 index 0000000000..735a96a3df --- /dev/null +++ b/app/src/main/res/layout-land/error_no_connection.xml @@ -0,0 +1,43 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/error_no_connection_with_button.xml b/app/src/main/res/layout-land/error_no_connection_with_button.xml new file mode 100644 index 0000000000..adb584f43d --- /dev/null +++ b/app/src/main/res/layout-land/error_no_connection_with_button.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/error_user_not_found.xml b/app/src/main/res/layout-land/error_user_not_found.xml new file mode 100644 index 0000000000..a67228aa6e --- /dev/null +++ b/app/src/main/res/layout-land/error_user_not_found.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/corrupted_lesson.xml b/app/src/main/res/layout/corrupted_lesson.xml deleted file mode 100644 index 6ddbbadde2..0000000000 --- a/app/src/main/res/layout/corrupted_lesson.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/empty_certificates.xml b/app/src/main/res/layout/empty_certificates.xml index 92972bc476..5e943ed1bf 100644 --- a/app/src/main/res/layout/empty_certificates.xml +++ b/app/src/main/res/layout/empty_certificates.xml @@ -1,19 +1,46 @@ - + + + android:layout_margin="@dimen/padding_placeholders" + android:text="@string/empty_certificates" + app:layout_constraintBottom_toTopOf="@+id/goToCatalog" + app:layout_constraintTop_toBottomOf="@+id/placeholderIcon" /> - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/empty_comments.xml b/app/src/main/res/layout/empty_comments.xml index f2f1da8417..e7006cbf24 100644 --- a/app/src/main/res/layout/empty_comments.xml +++ b/app/src/main/res/layout/empty_comments.xml @@ -1,18 +1,35 @@ - + + - \ No newline at end of file + android:layout_margin="@dimen/padding_placeholders" + android:text="@string/leave_first_comment" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toBottomOf="@+id/placeholderIcon" /> + + \ No newline at end of file diff --git a/app/src/main/res/layout/empty_courses.xml b/app/src/main/res/layout/empty_courses.xml index 12601082cb..e5cf037479 100644 --- a/app/src/main/res/layout/empty_courses.xml +++ b/app/src/main/res/layout/empty_courses.xml @@ -1,53 +1,60 @@ - - - - + - + -