Soru & Cevap

Linear layout tasarımı

11.05.2016 - 03:36

Merhabalar eclipse tasarım yapmaya çaşışıyorum custom listview içim ancak eklediğim linear layoutlar programı telefonda çalıstırınca yukarıya doğru kayıyor bunu engellemem için ne yapmalıyım internette araştırdım layout_weight özelliği kullanılıyormuş   bende denedim ancak bir sonuc alamadım   

     Ek teki resimde bulunan örneğin kocaeli sol tarafta bulunan kırmızı iconun yanında olmasını istiyorum ancak program çalıştığında kayıyor.

 XML kodlarım ;



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    
    
    <RelativeLayout 
        android:layout_width="fill_parent" 
        android:layout_height="50dp"
        android:background="@color/header_bg">
       
	    <TextView 
	        android:layout_width="wrap_content" 
	        android:layout_height="wrap_content"
	        android:text="@string/loaded_positions"
	        android:textSize="15sp"
	        android:textStyle="bold"
	        android:textColor="@color/white"
	        android:layout_centerInParent="true"/>
	   
    </RelativeLayout>
        
           <LinearLayout
               android:layout_width="match_parent"
               android:layout_height="wrap_content" >
        
          <LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="130dp"
              android:layout_marginTop="3dp"
              android:layout_weight="1"
             
              android:orientation="horizontal" >

              <LinearLayout
                  android:layout_width="70dp"
                  android:layout_height="fill_parent"
                  android:orientation="vertical" >

                
                  
                  <LinearLayout
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:layout_alignParentLeft="true"
                      android:layout_gravity="center_vertical"
                      android:layout_marginLeft="3dp"
                      android:layout_marginTop="9dp"
                      android:adjustViewBounds="true"
                      android:background="@drawable/graycirledom"
                      android:contentDescription="@string/back"
                      android:scaleType="fitXY" >
                      
                      <ImageView 
                          
                          android:layout_width="50dp"
                          android:layout_height="50dp"
                          android:layout_gravity="center"
                          android:layout_marginLeft="9dp"
                          android:layout_marginTop="2dp"
                          android:src="@drawable/gear"
                          
                          />
                  </LinearLayout>

                  <TextView
                      android:layout_width="fill_parent"
                      android:layout_height="20dp"
                      android:gravity="center"
                      android:text="Araç Taşıma"
                      android:textSize="10sp" />
              </LinearLayout>

              <LinearLayout
                  android:layout_width="0dp"
                  android:layout_weight="2"
                  android:layout_height="fill_parent"
                  android:gravity="center_horizontal"
                  android:layout_marginLeft="10dp"
                  android:orientation="vertical" >
                      
                  <LinearLayout 
                      android:layout_width="fill_parent"                     
                      android:layout_height="match_parent"
                      android:orientation="horizontal">
                      
                      <LinearLayout 
                          android:layout_width="25dp"
                          android:layout_height="fill_parent"
                          android:gravity="left"
                          android:orientation="vertical">
                    
                          <ImageView
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:layout_alignParentLeft="true"
                          android:layout_gravity="center_vertical"
                          android:layout_marginLeft="6dp"
                          android:layout_marginTop="5dp"
                          android:adjustViewBounds="true"
                          android:contentDescription="@string/back"
                          android:scaleType="fitXY"
                          android:src="@drawable/circles" />

                      <ImageView
                          android:layout_width="fill_parent"
                          android:layout_height="70dp"
                          android:layout_alignParentLeft="true"
                          android:layout_gravity="center_vertical"
                          android:layout_marginLeft="6dp"
                          android:layout_marginTop="7dp"
                          android:adjustViewBounds="true"
                          android:contentDescription="@string/back"
                          android:scaleType="fitXY"
                          android:src="@drawable/route" />
                          
                      </LinearLayout>
                      
                      <LinearLayout 
                          android:layout_width="0dp"
                          android:layout_height="fill_parent"
                          android:orientation="vertical"
                          android:layout_weight="1">
                      
                          <LinearLayout 
                              android:layout_width="fill_parent"
                              android:layout_height="wrap_content"
                              android:layout_marginLeft="5dp">
                              
                              <TextView 
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="132545"
                                  android:layout_marginTop="5dp"
                                  android:textSize="17sp"
                                  android:textStyle="bold"/>                             
                               
                          </LinearLayout>
                          
                           <LinearLayout 
                              android:layout_width="fill_parent"
                              android:layout_height="wrap_content"
                              android:layout_marginTop="5dp"
                              android:layout_marginLeft="5dp">
                              
                              <TextView 
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="İSTANBUL"
                                   android:textSize="20sp"
                                  android:textStyle="bold"/>                             
                               
                          </LinearLayout>
                          
                           <LinearLayout 
                               android:layout_width="fill_parent"
                               android:layout_height="wrap_content"
                               android:layout_marginLeft="5dp"
                               android:orientation="horizontal">
                               
                               <TextView 
                                   android:layout_width="20dp"
                                   android:layout_height="fill_parent"
                                   android:textStyle="bold"
                                   android:textSize="15sp"
                              	   android:text="->"
                                    android:layout_gravity="center_horizontal"/>
                               
                               <TextView 
                                     android:layout_width="fill_parent"
                                     android:layout_height="fill_parent"
                                     android:layout_marginLeft="3dp"
                              		 android:text="Orhanlı"
                            		 android:textStyle="bold"
                             	   	 android:textColor="#bfbfbf"
                             		 android:textSize="17sp"/>
                               
                           </LinearLayout>
                           
                            <LinearLayout 
                              android:layout_width="fill_parent"
                              android:layout_height="wrap_content"
                              android:layout_marginTop="5dp"
                              android:layout_marginLeft="5dp">
                              
                              <TextView 
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="KOCAELİ"
                                   android:textSize="20sp"
                                  android:textStyle="bold"/>                             
                               
                          </LinearLayout>
                            <LinearLayout 
                               android:layout_width="fill_parent"
                               android:layout_height="wrap_content"
                               android:layout_marginBottom="1dp"
                               android:layout_marginLeft="5dp"
                               android:orientation="horizontal">
                               
                               <TextView 
                                   android:layout_width="20dp"
                                   android:layout_height="fill_parent"
                                   android:textStyle="bold"
                                   android:textSize="15sp"                                  
                              	   android:text="->"
                                    android:layout_gravity="center_horizontal"/>
                               
                               <TextView 
                                     android:layout_width="fill_parent"
                                     android:layout_height="fill_parent"
                                     android:layout_marginLeft="3dp"
                              		 android:text="İzmit"
                            		 android:textStyle="bold"
                             	   	 android:textColor="#bfbfbf"
                             		 android:textSize="17sp"/>
                               
                           </LinearLayout>
                          
                      </LinearLayout>
                      
                  </LinearLayout>
                  

                  
                  
                  
                                  
                
              </LinearLayout>
                
              
                 <LinearLayout 
                     android:layout_width="60dp"
                     android:layout_height="fill_parent"                    
                     android:layout_gravity="right"
                     android:layout_marginRight="0dp">
               <LinearLayout
                       	  android:layout_width="1dp"
               			   android:layout_height="match_parent"
               			   android:background="@color/gray" >
              </LinearLayout>
              <LinearLayout 
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:layout_marginLeft="3dp"
                  android:orientation="vertical">
                  
                    <TextView
                      android:layout_width="fill_parent"
                      android:layout_height="20dp"
                      android:gravity="center"
                      android:layout_marginTop="30dp"
                      android:text="12"
                      android:textStyle="bold"
                      android:textSize="20sp" />
                    
                    <LinearLayout
                      android:layout_width="fill_parent"
                      android:layout_height="20dp"
                    
                      android:layout_gravity="center"
                      android:layout_marginLeft="3dp"
                      android:layout_marginRight="3dp"
                      android:layout_marginTop="7dp"
                      android:adjustViewBounds="true"
                      android:background="@drawable/truck"
                      android:contentDescription="@string/back"
                      android:scaleType="fitXY" >
                  </LinearLayout>
                    
                  </LinearLayout>
              
                 </LinearLayout>
              

          </LinearLayout>

</LinearLayout>


</LinearLayout>

 

40 Görüntülenme

4 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.

Profile picture for user gokhngungor
gokhngungor
11.05.2016 - 05:32

ikinci resimde kaymış hali bulunmaktadır

/sites/default/files/cevaplar/dosya/2020/file-screenshot_2016-05-11-17-28-30.png
picture-30491-1565085904.jpg
serhatleventyavas
11.05.2016 - 04:45
Kaymış şekli gosterir misin dostum
Profile picture for user gokhngungor
gokhngungor
11.05.2016 - 04:15

 Merhaba Ekte bulunan resimde  İl  ve ilçeleri ekledim  telefonda programı çalıştırınca textview ' lerim  yukarıya kayıyor  yani tasarımlarımın kaymaması için ne yapmalıyım    

picture-30491-1565085904.jpg
serhatleventyavas
11.05.2016 - 03:58

dostum ne yapmak istediğini anlamadım. Eğer açıklarsan ben de yardımcı olabilirim