hello dear friends i'm not a developer not app designer what i know is just buiding website and i'm an autolearner.
i have a national champion to make an app mockup in photoshop it is litle hard beacause i must show it with basic function.
and i want just to know how to integrate imagine in app like this pictures 8180b3ecbe4e1919b4882b06689b9141
i tried this xml code but i'm sure it is not what i must do

<ImageView 
           android:
           android:id="@+id/addpic"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
   />
    </LinearLayout>

Recommended Answers

All 5 Replies

As I mentioned before in your other thread (that you did not close) design for mobile apps is not same as design for web sites.

XML extract of layout that you posted is actually what you need to show image on screen. However beside required stuff you did (layout width & height) there are other things like padding, positioning and more. Also like in HTML with CSS you can do some interesting combinations.

So if you care to explain what you are having difficulties to achieve someone may try to help you. Simply posting image wouldn't help. So we are expecting good description of problem, because your post above does not satisface that...

realy i'm not webdesigner but or webdeveloper i haver read many book and many tutorial on web and help on forum and i can develope and design a website. 'im young autodidact, i just stard with app developement, i want just make prototype a mock up but because i'm in a national digital champion and my proposal is for an androi app. and my pc is very old with an AMD seprom 2.10Ghz. the emulator is very slow. i get unfortunately app as stopped and if i start post on forum i don't know if i will get help.
i have main_activity_xml
and fragment_main.xml
i don't know the difference betwin them.
in fragment i have this code but it not realy beay full i can't test on elumator is very slow and now it stop every time.

 <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:orientation="vertical" 
   >
   /*i want this text to be like the title of the image*/
    <textView
        android:text="@string/posttitle"
        android:id="@+id/titleid"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />

    <ImageView
        android:id="@+id/picid"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="0dp"
        android:layout_marginLeft="0dp"
        android:layout_marginRight="0dp"
        android:layout_marginTop="0dp"
        android:src="@drawable/food" />
/*i want this text to be like comment or description of the image*/
    <textView
        android:text="@string/postdesc"
        android:id="@+id/postpicdesc"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />   
    </LinearLayout>
  1. It is not textView but TextView
  2. Secondly like I mentioned previouly you can format text in similar way like CSS. Each elements of layout can be styled individually or under shared style.

Individual options besides layout_width and layout_height will include

android:background
android:padding
android:paddingBottom
android:paddingTop
android:paddingLeft
android:paddingRight

These in case of TextView expand also to

android:fontFamily
android:textColour
android:textSize
android:TextStyle

and others. Just check out Android API like here for TextView
You can read more about styles here

thank you dear.
but here i add 3 item in my layout every item is a Textview imageview and text view.
first text view as title image and last text view as descriiption.
but is not grouped like i want any can i use textview in an imageview???.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.eui.cyprussocialcity.MainActivity$PlaceholderFragment" >

    <TextView
        android:id="@+id/section_label"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:orientation="vertical" >

    <TextView
        android:text="@string/posttitle"
        android:id="@+id/titleid"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />

    <ImageView
        android:id="@+id/picid"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="0dp"
        android:layout_marginLeft="0dp"
        android:layout_marginRight="0dp"
        android:layout_marginTop="0dp"
        android:src="@drawable/food"
        android:contentDescription="@string/postdesc" />

    <TextView
        android:text="@string/postdesc"
        android:id="@+id/postpicdesc"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />
       <RatingBar
        android:id="@+id/ratingBar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:numStars="4"
        android:stepSize="1.0"
        android:rating="2.0" />

           <TextView
        android:text="@string/posttitle"
        android:id="@+id/titleid2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />

    <ImageView
        android:id="@+id/picid2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="0dp"
        android:layout_marginLeft="0dp"
        android:layout_marginRight="0dp"
        android:layout_marginTop="0dp"
        android:src="@drawable/st07"
        android:contentDescription="@string/postdesc" />

    <TextView
        android:text="@string/postdesc"
        android:id="@+id/postpicdesc2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />
       <RatingBar
        android:id="@+id/ratingBar2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:numStars="4"
        android:stepSize="1.0"
        android:rating="2.0" />

           <TextView
        android:text="@string/posttitle"
        android:id="@+id/titleid1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />

    <ImageView
        android:id="@+id/picid3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="0dp"
        android:layout_marginLeft="0dp"
        android:layout_marginRight="0dp"
        android:layout_marginTop="0dp"
        android:src="@drawable/food"
        android:contentDescription="@string/postdesc" />

    <TextView
        android:text="@string/postdesc"
        android:id="@+id/postpicdesc3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />
       <RatingBar
        android:id="@+id/ratingBar3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:numStars="4"
        android:stepSize="1.0"
        android:rating="2.0" />
    </LinearLayout>

</RelativeLayout>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.