hoppelijk sloopt dit niks
This commit is contained in:
@@ -30,6 +30,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
|
implementation 'com.facebook.shimmer:shimmer:0.5.0'
|
||||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||||
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
|
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
|
||||||
implementation 'com.android.support:cardview-v7:28.0.0'
|
implementation 'com.android.support:cardview-v7:28.0.0'
|
||||||
|
@@ -34,6 +34,7 @@ import com.example.fitbot.exercise.ExerciseManager;
|
|||||||
import com.example.fitbot.pepper.Pepper;
|
import com.example.fitbot.pepper.Pepper;
|
||||||
import com.example.fitbot.util.NavigationManager;
|
import com.example.fitbot.util.NavigationManager;
|
||||||
import com.example.fitbot.util.processing.InputProcessor;
|
import com.example.fitbot.util.processing.InputProcessor;
|
||||||
|
import com.facebook.shimmer.ShimmerFrameLayout;
|
||||||
|
|
||||||
public class FitnessActivity extends RobotActivity implements RobotLifecycleCallbacks {
|
public class FitnessActivity extends RobotActivity implements RobotLifecycleCallbacks {
|
||||||
|
|
||||||
@@ -92,6 +93,10 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
|||||||
progressText = findViewById(R.id.progressText);
|
progressText = findViewById(R.id.progressText);
|
||||||
progressCircle.setMax(maxProgress);
|
progressCircle.setMax(maxProgress);
|
||||||
|
|
||||||
|
ShimmerFrameLayout shimmerLayout = findViewById(R.id.shimmerFrameLayout);
|
||||||
|
shimmerLayout.startShimmer(); // Start shimmer animation
|
||||||
|
|
||||||
|
|
||||||
// Set color of loading circle
|
// Set color of loading circle
|
||||||
ProgressBar loadingCircle = findViewById(R.id.loadingCircle);
|
ProgressBar loadingCircle = findViewById(R.id.loadingCircle);
|
||||||
loadingCircle.setIndeterminateTintList(ColorStateList.valueOf(Color.RED));
|
loadingCircle.setIndeterminateTintList(ColorStateList.valueOf(Color.RED));
|
||||||
@@ -176,6 +181,9 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
|||||||
// exerciseDescriptionTextView.setText(exercise.description);
|
// exerciseDescriptionTextView.setText(exercise.description);
|
||||||
exerciseVideoUrl = exercise.videoUrl;
|
exerciseVideoUrl = exercise.videoUrl;
|
||||||
|
|
||||||
|
ShimmerFrameLayout shimmerLayout = findViewById(R.id.shimmerFrameLayout);
|
||||||
|
shimmerLayout.stopShimmer(); // Start shimmer animation
|
||||||
|
|
||||||
// Play the video
|
// Play the video
|
||||||
playVideo(videoView, this);
|
playVideo(videoView, this);
|
||||||
|
|
||||||
|
@@ -60,17 +60,22 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<com.facebook.shimmer.ShimmerFrameLayout
|
||||||
|
android:id="@+id/shimmerFrameLayout"
|
||||||
android:layout_width="450dp"
|
android:layout_width="450dp"
|
||||||
android:layout_height="450dp"
|
android:layout_height="450dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:background="@drawable/border_background"
|
android:background="@drawable/border_background"
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="20dp"
|
android:padding="20dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textViewFitnessTitle"
|
android:id="@+id/textViewFitnessTitle"
|
||||||
style="@style/TextStyleTitle"
|
style="@style/TextStyleTitle"
|
||||||
@@ -97,7 +102,6 @@
|
|||||||
android:textAlignment="center" />
|
android:textAlignment="center" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -129,6 +133,9 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.facebook.shimmer.ShimmerFrameLayout>
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/homeButtonFitness"
|
android:id="@+id/homeButtonFitness"
|
||||||
android:layout_width="150dp"
|
android:layout_width="150dp"
|
||||||
|
@@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
|
|
||||||
<string name="exerciseDesc">Exercise description</string>
|
|
||||||
<string name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</string>
|
<string name="description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</string>
|
||||||
|
<string name="descriptionTitle">Description</string>
|
||||||
|
|
||||||
|
<string name="exerciseDesc">Exercise description</string>
|
||||||
<string name="exerciseTitle">Exercise title</string>
|
<string name="exerciseTitle">Exercise title</string>
|
||||||
</resources>
|
</resources>
|
@@ -15,4 +15,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|||||||
# resources declared in the library itself and none from the library's dependencies,
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
# thereby reducing the size of the R class for that library
|
# thereby reducing the size of the R class for that library
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
#android.enableJetifier=true
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
||||||
|
Reference in New Issue
Block a user