Skip to content

Instantly share code, notes, and snippets.

@sunmeat
Last active January 5, 2026 17:34
Show Gist options
  • Select an option

  • Save sunmeat/68c9b1ac64cf257513a4051f413d3dde to your computer and use it in GitHub Desktop.

Select an option

Save sunmeat/68c9b1ac64cf257513a4051f413d3dde to your computer and use it in GitHub Desktop.
приклад верстки актівіті в android-додатку
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true">
<com.google.android.gms.ads.AdView
android:id="@+id/ad_view"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentTop="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-7611995396546769/3607520537" />
<ImageView
android:layout_width="210dp"
android:layout_height="210dp"
android:layout_below="@+id/ad_view"
android:onClick="onClick"
android:layout_centerHorizontal="true"
android:src="@drawable/vzhuh" />
<LinearLayout
android:id="@+id/textAndVoice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:focusable="true"
android:orientation="horizontal">
<EditText
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="4dp"
android:layout_marginLeft="@dimen/my_default"
android:layout_weight="11"
android:hint="@string/pow"
android:inputType="textNoSuggestions"
android:maxLength="60"
android:textColor="@color/colorBrownDark"
android:textColorHint="@color/colorGrayDark"
android:textSize="40sp">
</EditText>
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/my_default"
android:onClick="mic"
android:src="@drawable/ic_mic_black_24dp"
app:backgroundTint="@color/colorBrown" />
</LinearLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment