Skip to content

Commit

Permalink
Fixed audio_video_image_text_label layout
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Dec 10, 2019
1 parent bf9a3c2 commit 559c4d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.widget.CheckBox;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
Expand Down Expand Up @@ -76,6 +77,9 @@ public class AudioVideoImageTextLabel extends RelativeLayout implements View.OnC
@BindView(R.id.text_container)
FrameLayout textContainer;

@BindView(R.id.media_buttons)
LinearLayout mediaButtonsContainer;

private TextView labelTextView;
private String videoURI;
private int playTextColor = Color.BLUE;
Expand Down Expand Up @@ -258,11 +262,13 @@ private void setupBigImage(String imageURI) {

private void setupVideoButton() {
videoButton.setVisibility(VISIBLE);
mediaButtonsContainer.setVisibility(VISIBLE);
videoButton.setOnClickListener(this);
}

private void setupAudioButton(String audioURI, AudioHelper audioHelper) {
audioButton.setVisibility(VISIBLE);
mediaButtonsContainer.setVisibility(VISIBLE);

ScreenContext activity = getScreenContext();
String clipID = getTag() != null ? getTag().toString() : "";
Expand Down
12 changes: 8 additions & 4 deletions collect_app/src/main/res/layout/audio_video_image_text_label.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
Expand All @@ -26,6 +26,8 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_standard"
android:paddingLeft="@dimen/margin_standard"
android:paddingRight="@dimen/margin_standard"
android:paddingEnd="@dimen/margin_standard"
android:paddingBottom="@dimen/margin_standard"
android:scaleType="fitStart"
android:visibility="gone" />
Expand All @@ -36,6 +38,8 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_standard"
android:paddingLeft="@dimen/margin_standard"
android:paddingRight="@dimen/margin_standard"
android:paddingEnd="@dimen/margin_standard"
android:paddingBottom="@dimen/margin_standard"
android:visibility="gone"
tools:text="media missing"
Expand All @@ -51,12 +55,12 @@
android:layout_alignParentRight="true"
android:gravity="end"
android:orientation="vertical"
android:paddingLeft="@dimen/margin_standard"
android:paddingStart="@dimen/margin_standard"
android:paddingRight="@dimen/margin_standard"
android:paddingEnd="@dimen/margin_standard"
android:paddingTop="@dimen/margin_extra_small"
android:paddingBottom="@dimen/margin_extra_small">
android:paddingBottom="@dimen/margin_extra_small"
android:visibility="gone"
tools:visibility="visible">

<org.odk.collect.android.audio.AudioButton
android:id="@+id/audioButton"
Expand Down

0 comments on commit 559c4d7

Please sign in to comment.