mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-16 11:20:55 +01:00
move video timer text to top of shutter
This commit is contained in:
parent
1afd0f515c
commit
6b906d1076
@ -14,7 +14,6 @@ import android.provider.MediaStore
|
||||
import android.view.*
|
||||
import android.widget.LinearLayout
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.*
|
||||
import androidx.transition.*
|
||||
@ -306,9 +305,8 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
|
||||
}
|
||||
|
||||
val marginBottom = safeInsetBottom + navigationBarHeight + resources.getDimensionPixelSize(R.dimen.bigger_margin)
|
||||
(shutter.layoutParams as ConstraintLayout.LayoutParams).goneBottomMargin = marginBottom
|
||||
|
||||
video_rec_curr_timer.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
shutter.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
bottomMargin = marginBottom
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,21 @@
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_rec_curr_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="@dimen/smaller_margin"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/shutter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="00:00"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toggle_camera"
|
||||
android:layout_width="@dimen/icon_size"
|
||||
@ -92,14 +107,13 @@
|
||||
android:id="@+id/shutter"
|
||||
android:layout_width="@dimen/large_icon_size"
|
||||
android:layout_height="@dimen/large_icon_size"
|
||||
android:layout_marginBottom="@dimen/small_margin"
|
||||
android:layout_marginBottom="@dimen/big_margin"
|
||||
android:contentDescription="@string/shutter"
|
||||
android:src="@drawable/ic_shutter_animated"
|
||||
app:layout_constraintBottom_toTopOf="@id/video_rec_curr_timer"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/last_photo_video_preview"
|
||||
app:layout_constraintStart_toEndOf="@id/toggle_camera"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
app:layout_goneMarginBottom="@dimen/big_margin" />
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/last_photo_video_preview"
|
||||
@ -113,19 +127,4 @@
|
||||
app:layout_constraintTop_toTopOf="@id/shutter"
|
||||
tools:src="@tools:sample/backgrounds/scenic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_rec_curr_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/small_margin"
|
||||
android:layout_marginBottom="@dimen/big_margin"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="00:00"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user