0

I'm new in android. I want to show activity by moving up and down. (We can see it in many music players). But I don't know how to do it. Please give me some solutions, examples or suggestions.

Music player

Dilshod K
  • 2,924
  • 1
  • 13
  • 46

2 Answers2

0

Как дела?

Suggestion: You may find all crazy animation, including 2D and 3D animation in the following link. I did not have enough time find the exact one but I am sure they exist in this following collection.

https://android-arsenal.com/tag/6?sort=created

Advice: You can easily achieve it with Animation APIs in Android SDK. Or you may find some relevant answers here

Make activity animate from top to bottom

Good luck.

Farruh Habibullaev
  • 2,342
  • 1
  • 26
  • 33
0

Finally, I decided to use Android Bottom Sheet. Here is code example:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/bottom_sheet"
    android:layout_width="match_parent"
    android:layout_height="340dp"
    android:background="@android:color/darker_gray"
    android:orientation="vertical"
    app:behavior_hideable="true"
    app:behavior_peekHeight="80dp"
    app:layout_behavior="android.support.design.widget.BottomSheetBehavior">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="80dp"
        android:background="@color/colorAccent"
        android:gravity="center"
        android:text="@string/bottom_sheet_peek"
        android:textColor="@android:color/white" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="@string/bottom_sheet_content"
        android:textColor="@android:color/white" />

</LinearLayout>

result

Dilshod K
  • 2,924
  • 1
  • 13
  • 46