79232350

Date: 2024-11-28 01:47:37
Score: 3
Natty:
Report link

how is your app ?

I need a flexible post creation feature in an app, similar to what we have in social media apps like Twitter, that allows users to add text, images, and location freely without using EditText fields.

I know how to add content using EditText for text and ImageView for images, but in real Android apps, they use a different approach.

For example, the Twitter post activity allows users to write freely and add images, GIFs, and locations if desired.

The post activity will help me add geological discoveries from the field, which will include:

-a title : text -an image : uri,string -date(auto generated ): number -gps coordinates (auto generated): number -dimensions ,auto generated : number -texture , color,hardnes :strings -mineral composition : a text,long a little -structural features :long text -formation ,a text -context : medium text -Name : the name of the rock , it is a text

I want to build something that is user friendly.

Below is my full android resource file (code) that i have:

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="16dp">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp">

            <ImageButton
                android:id="@+id/btn_close"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_alignParentStart="true"
                android:layout_centerVertical="true"
                android:contentDescription="Close"
                android:src="@android:drawable/ic_menu_close_clear_cancel" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:text="Drafts"
                android:textColor="#FFFFFF"
                android:textSize="18sp" />

            <Button
                android:id="@+id/btn_post"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_centerVertical="true"
                android:background="@drawable/rounded_button"
                android:text="Post"
                android:textColor="#FFFFFF" />
        </RelativeLayout>

        <com.google.android.material.imageview.ShapeableImageView
            android:id="@+id/profileImage"
            android:layout_width="70dp"
            android:layout_height="70dp"
            android:scaleType="centerCrop"
            app:shapeAppearanceOverlay="@style/CircularImageView"
            app:strokeColor="#713808"
            app:strokeWidth="2dp" />

        <EditText
            android:id="@+id/et_post_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:background="@null"
            android:hint="Your discovery"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:minHeight="48dp"
            android:inputType="textMultiLine" />

        <EditText
            android:id="@+id/color"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@null"
            android:hint="Color"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:minHeight="48dp"
            android:inputType="text" />

        <EditText
            android:id="@+id/hardness"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@null"
            android:hint="Hardness"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:minHeight="48dp"
            android:inputType="text" />

        <EditText
            android:id="@+id/composition"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@null"
            android:hint="Composition"
            android:minHeight="48dp"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:inputType="text" />

        <EditText
            android:id="@+id/structuralFeatures"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@null"
            android:hint="Structural features"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:minHeight="48dp"
            android:inputType="text" />

        <EditText
            android:id="@+id/formation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@null"
            android:hint="Formation"
            android:minHeight="48dp"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:inputType="text" />

        <EditText
            android:id="@+id/context"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@null"
            android:hint="Context"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:minHeight="48dp"
            android:inputType="text" />

        <EditText
            android:id="@+id/name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@null"
            android:hint="Name"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:minHeight="48dp"
            android:inputType="text" />

        <EditText
            android:id="@+id/story"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:background="@null"
            android:hint="About?"
            android:textColor="#FFFFFF"
            android:textColorHint="#AAAAAA"
            android:minHeight="48dp"
            android:inputType="textMultiLine" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal"
        android:padding="16dp">

        <ImageButton
            android:id="@+id/addImage"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_weight="1"

            android:contentDescription="Add Image"
            android:src="@android:drawable/ic_menu_gallery" />

        <ImageButton
            android:id="@+id/btn_add_gif"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_weight="1"
            android:contentDescription="Add GIF"
            android:src="@android:drawable/ic_menu_rotate" />

        <ImageButton
            android:id="@+id/btn_add_poll"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_weight="1"
            android:contentDescription="Add Poll"
            android:src="@android:drawable/ic_menu_sort_by_size" />

        <ImageButton
            android:id="@+id/btn_add_location"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_weight="1"
            android:contentDescription="Add Location"
            android:src="@android:drawable/ic_menu_mylocation" />

        <ImageButton
            android:id="@+id/btn_more_options"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_weight="1"
            android:contentDescription="More Options"
            android:src="@android:drawable/ic_menu_more" />
    </LinearLayout>
</RelativeLayout>
Reasons:
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): how is you
  • Low reputation (1):
Posted by: BALMA