Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 2 additions & 58 deletions VideoLocker/res/layout/activity_course_base.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was fine in two lines, as this makes the line quite long.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we aren't using the app namespace now, so, autoformat seems to have moved it to the same line. Looks fine currently I guess.

xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:splitMotionEvents="false" >
android:splitMotionEvents="false">

<FrameLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -44,60 +42,6 @@
<View style="@style/red_separator" />
</LinearLayout>

<LinearLayout
android:id="@+id/download_in_progress_bar"
android:orientation="vertical"
style="@style/download_in_progress_bar"
android:visibility="gone">

<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_gravity="center_vertical"
tools:targetApi="17">

<org.edx.mobile.third_party.iconify.IconView
android:id="@+id/video_download_indicator"
app:iconName="fa_spinner"
android:layout_width="14dp"
android:layout_height="14dp"
android:baselineAlignBottom="true"/>

<org.edx.mobile.view.custom.ETextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
style="@style/regular_text"
android:gravity="left|start"
android:textColor="@color/edx_brand_primary_base"
android:textSize="16sp"
android:text="@string/video_download_in_progress"
tools:targetApi="17" />


<org.edx.mobile.view.custom.ETextView
android:id="@+id/download_in_progress_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/regular_text"
android:gravity="center"
android:textColor="@color/edx_brand_primary_base"
android:textSize="16sp"
android:padding="10dp"
android:textAllCaps="true"
android:text="@string/view_button_text" />

</LinearLayout>

<View style="@style/blue_separator"/>
</LinearLayout>

<LinearLayout
android:id="@+id/last_access_bar"
android:orientation="vertical"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
import com.google.inject.Inject;

import org.edx.mobile.core.IEdxEnvironment;
import org.edx.mobile.event.DownloadEvent;
import org.edx.mobile.model.api.EnrolledCoursesResponse;
import org.edx.mobile.view.Router;

import de.greenrobot.event.EventBus;
import roboguice.fragment.RoboFragment;

public abstract class MyVideosBaseFragment extends RoboFragment {
Expand All @@ -22,26 +20,8 @@ public abstract class MyVideosBaseFragment extends RoboFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

if ( !EventBus.getDefault().isRegistered(this) )
EventBus.getDefault().register(this);
}

/**
* used by EventBus callback
* @param event
*/
public void onEvent(DownloadEvent event) {
reloadList();
}

@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}


/**
* Call this function when Video completes downloading
* so that downloaded videos appears in MyVideos listing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.edx.mobile.discussion;

import android.content.Context;
import android.support.annotation.StringRes;
import android.support.v4.widget.TextViewCompat;
import android.view.View;
Expand All @@ -26,21 +27,22 @@ public static void setStateOnTopicClosed(boolean isTopicClosed, TextView textVie
@StringRes int negativeTextResId,
ViewGroup creationLayout,
View.OnClickListener listener) {
Context context = textView.getContext();
if (isTopicClosed) {
textView.setText(negativeTextResId);
TextViewCompat.setCompoundDrawablesRelative(textView,
new IconDrawable(textView.getContext(), Iconify.IconValue.fa_lock)
.sizeRes(R.dimen.icon_view_standard_width_height)
.colorRes(R.color.edx_grayscale_neutral_white_t),
new IconDrawable(context, Iconify.IconValue.fa_lock)
.sizeRes(context, R.dimen.icon_view_standard_width_height)
.colorRes(context, R.color.edx_grayscale_neutral_white_t),
null, null, null
);
creationLayout.setOnClickListener(null);
} else {
textView.setText(positiveTextResId);
TextViewCompat.setCompoundDrawablesRelative(textView,
new IconDrawable(textView.getContext(), Iconify.IconValue.fa_plus_circle)
.sizeRes(R.dimen.icon_view_standard_width_height)
.colorRes(R.color.edx_grayscale_neutral_white_t),
.sizeRes(context, R.dimen.icon_view_standard_width_height)
.colorRes(context, R.color.edx_grayscale_neutral_white_t),
null, null, null
);
creationLayout.setOnClickListener(listener);
Expand Down
22 changes: 0 additions & 22 deletions VideoLocker/src/main/java/org/edx/mobile/event/DownloadEvent.java

This file was deleted.

Loading