android项目学习1

代码:

1.bottomshow.xml

页面最下角样式:

 

View Code
 1  <? xml version = " 1.0 "  encoding = " utf-8 " ?>
 2    < RelativeLayout   xmlns:android = " http://schemas.android.com/apk/res/android "  
 3      android:layout_marginBottom = " 0px "
 4          android:layout_width = " fill_parent "
 5 
 6          android:layout_height = " 90dip "
 7 
 8          android:layout_alignParentBottom = " true "
 9 
10          android:background = " #BB768e95 " >
11 
12               < LinearLayout  
13              android:layout_width = " wrap_content "  
14          android:layout_height = " 80dip "
15              android:orientation = " vertical "  
16              android:layout_alignParentLeft = " true "  
17              android:gravity = " center "  
18              android:layout_marginTop = " 0px "  
19            
20               >
21 
22               < ImageButton 
23              android:id = " @+id/newdingweiDW "  
24              android:layout_width = " 80dip "  
25                android:layout_height = " 80dip "
26              android:background = " @drawable/btn_liebiao__selctor "  
27                
28               >
29 
30               </ ImageButton >
31   
32 
33               </ LinearLayout >
34 
35               < LinearLayout 
36   
37              android:layout_width = " wrap_content "
38 
39               android:layout_height = " 80dip "
40 
41              android:orientation = " vertical "
42 
43              android:layout_centerInParent = " true "
44 
45              android:gravity = " center "
46        
47              android:layout_marginTop = " 3px " >
48 
49               < ImageButton
50 
51              android:id = " @+id/newdingweiLS "  
52               android:layout_width = " 80dip "  
53                android:layout_height = " 80dip "
54              android:background = " @drawable/btn_lishiliebiao_selctor "  
55              >
56 
57               </ ImageButton >
58 
59               
60 
61               </ LinearLayout >
62 
63               < LinearLayout
64 
65           
66              android:layout_width = " wrap_content "
67 
68        android:layout_height = " 80dip "
69 
70              android:orientation = " vertical "
71 
72              android:layout_alignParentRight = " true "
73   
74              android:gravity = " center "
75 
76              android:layout_marginTop = " 3px " >
77 
78               < ImageButton
79 
80              android:id = " @+id/newdingweiSZ "
81 
82              android:layout_width = " 80dip "  
83                android:layout_height = " 80dip "
84              android:background = " @drawable/btn_sz_selctor "  
85                >
86 
87               </ ImageButton >
88 
89           
90 
91               </ LinearLayout >
92              
93               
94 
95           </ RelativeLayout >

 

 

2.首页样式:

newdingwei.x
<? xml version = " 1.0 "  encoding = " utf-8 " ?>
 
< LinearLayout   xmlns:android = " http://schemas.android.com/apk/res/android "  android:background = " #ffeff0f4 "   
 

  android:orientation
= " vertical "

  android:layout_width
= " fill_parent "

  android:layout_height
= " fill_parent " >
< RelativeLayout  android:background = " @drawable/titlebar_lightgray_bg "  

  android:layout_width
= " fill_parent "

  android:layout_height
= " wrap_content "

  android:layout_margin
= " 3px " >

  

  
< TextView 
  android:layout_width
= " wrap_content "

  android:layout_height
= " wrap_content "

  android:layout_centerInParent
= " true "

  android:textColor
= " #343434 "
  android:text
= " 车辆定位 "

  android:textSize
= " 15px " >

  
</ TextView >
   
< ImageButton
      
  android:id
= " @+id/refreshBtn "

  android:layout_width
= " wrap_content "

  android:layout_height
= " wrap_content "

  android:layout_alignParentRight
= " true "

  android:layout_marginLeft
= " 12px "
     android:layout_marginTop
= " 5px "
  android:background
= " @drawable/btn_reflash_selctor " >

  
</ ImageButton >  
  
</ RelativeLayout >  
  
    
< LinearLayout android:orientation = " vertical "  android:background = " #ffeff0f4 "  android:layout_width = " fill_parent "  android:layout_height = " fill_parent " >
            
< RelativeLayout android:id = " @+id/vHDivider2 "  android:background = " @drawable/panel_bg "  android:layout_width = " fill_parent "  android:layout_height = " 100.0dip "  android:layout_margin = " 10.0dip " >
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:id = " @+id/tvSIM "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 5.0dip "  android:layout_marginTop = " 10.0dip "  android:text = " 车机SIM卡号 "  android:layout_alignParentLeft = " true "  android:layout_alignParentTop = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff373737 "  android:id = " @+id/txtSIM "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_toRightOf = " @id/tvSIM "  android:layout_alignTop = " @id/tvSIM "   android:text = ""    />
                
< View android:id = " @+id/tvViews "  android:background = " @drawable/horizontal_separation_line_repeat "  android:layout_width = " fill_parent "  android:layout_height = " 1.0dip "  android:layout_centerVertical = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:id = " @+id/tvPlt "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:text = " 车机车牌号 "  android:layout_below = " @id/tvViews "  android:layout_alignLeft = " @id/tvSIM "  android:layout_alignParentBottom = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff373737 "  android:gravity = " center_vertical "  android:id = " @+id/txtPlt "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_marginBottom = " 12.0dip "   android:text = ""   android:singleLine = " true "  android:layout_toRightOf = " @id/tvPlt "  android:layout_alignBottom = " @id/tvPlt "   />
            
</ RelativeLayout >
          
< RelativeLayout android:background = " @drawable/panel_bg "  android:layout_width = " fill_parent "  android:layout_height = " 120.0dip "  android:layout_margin = " 10.0dip " >
                 
< TextView  android:id = " @+id/tvTime "   android:layout_below = " @id/vHDivider2 "  android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 5.0dip "  android:layout_marginTop = " 10.0dip "  android:text = " 定位时间 "  android:layout_alignParentLeft = " true "  android:layout_alignParentTop = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff373737 "  android:id = " @+id/txtTime "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_toRightOf = " @id/tvTime "  android:layout_alignTop = " @id/tvTime "   android:text = ""    />
                
< View  android:id = " @+id/tvViews1 "  android:background = " @drawable/horizontal_separation_line_repeat "  android:layout_width = " fill_parent "  android:layout_height = " 1.0dip "  android:layout_centerVertical = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:id = " @+id/tvInfo "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:text = " 定位详细 "  android:layout_below = " @id/tvViews1 "  android:layout_alignLeft = " @id/tvTime "  android:layout_alignParentBottom = " true "   />
                
< TextView android:textSize = " 12.0sp "   android:singleLine = " false "       android:textColor = " #ff373737 "  android:gravity = " center_vertical "  android:id = " @+id/txtInfo "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_marginTop = " 1.0dip "   android:text = ""  android:layout_toRightOf = " @id/tvInfo "  android:layout_alignTop = " @id/tvInfo "   />
          
              
</ RelativeLayout >  
                 
< RelativeLayout  android:layout_width = " fill_parent "  android:layout_height = " 70.0dip "  android:layout_margin = " 10.0dip " >
               
            
< ImageButton 
          android:layout_centerHorizontal
= " true "  
            android:id
= " @+id/newdingweishowMap "  
            android:layout_width
= " 200.0dip "  
            android:layout_height
= " 70.0dip "
            android:background
= " @drawable/search_map "
  
          
>

            
</ ImageButton >
              
</ RelativeLayout >
              
              
< RelativeLayout 
    android:layout_width
= " fill_parent "  
    android:layout_height
= " fill_parent " >  
             
< ListView android:id = " @+id/ListView02 "    android:layout_x = " 0px "
    android:layout_y
= " 53px "   android:scrollingCache = " false "
     android:layout_width
= " wrap_content "
 android:layout_height
= " wrap_content " ></ ListView >
     
< include layout = " @layout/bottomshow "   />

   

  
</ RelativeLayout >
 
</ LinearLayout >
</ LinearLayout >
 

 

 

3.子页面下角newdingwei2.xml

 

<? xml version = " 1.0 "  encoding = " utf-8 " ?>
 
< LinearLayout   xmlns:android = " http://schemas.android.com/apk/res/android "  android:background = " #ffeff0f4 "   
 

  android:orientation
= " vertical "

  android:layout_width
= " fill_parent "

  android:layout_height
= " fill_parent " >
< RelativeLayout  android:background = " @drawable/titlebar_lightgray_bg "  

  android:layout_width
= " fill_parent "

  android:layout_height
= " wrap_content "

  android:layout_margin
= " 3px " >

  

  
< TextView 
  android:layout_width
= " wrap_content "

  android:layout_height
= " wrap_content "

  android:layout_centerInParent
= " true "

  android:textColor
= " #343434 "
  android:text
= " 车辆定位 "

  android:textSize
= " 15px " >

  
</ TextView >
   
< ImageButton
      
  android:id
= " @+id/refreshBtn "

  android:layout_width
= " wrap_content "

  android:layout_height
= " wrap_content "

  android:layout_alignParentRight
= " true "

  android:layout_marginLeft
= " 12px "
     android:layout_marginTop
= " 5px "
  android:background
= " @drawable/btn_reflash_selctor " >

  
</ ImageButton >  
  
</ RelativeLayout >  
  
    
< LinearLayout android:orientation = " vertical "  android:background = " #ffeff0f4 "  android:layout_width = " fill_parent "  android:layout_height = " fill_parent " >
            
< RelativeLayout android:id = " @+id/vHDivider2 "  android:background = " @drawable/panel_bg "  android:layout_width = " fill_parent "  android:layout_height = " 100.0dip "  android:layout_margin = " 10.0dip " >
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:id = " @+id/tvSIM "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 5.0dip "  android:layout_marginTop = " 10.0dip "  android:text = " 车机SIM卡号 "  android:layout_alignParentLeft = " true "  android:layout_alignParentTop = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff373737 "  android:id = " @+id/txtSIM "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_toRightOf = " @id/tvSIM "  android:layout_alignTop = " @id/tvSIM "   android:text = ""    />
                
< View android:id = " @+id/tvViews "  android:background = " @drawable/horizontal_separation_line_repeat "  android:layout_width = " fill_parent "  android:layout_height = " 1.0dip "  android:layout_centerVertical = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:id = " @+id/tvPlt "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:text = " 车机车牌号 "  android:layout_below = " @id/tvViews "  android:layout_alignLeft = " @id/tvSIM "  android:layout_alignParentBottom = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff373737 "  android:gravity = " center_vertical "  android:id = " @+id/txtPlt "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_marginBottom = " 12.0dip "   android:text = ""   android:singleLine = " true "  android:layout_toRightOf = " @id/tvPlt "  android:layout_alignBottom = " @id/tvPlt "   />
            
</ RelativeLayout >
          
< RelativeLayout android:background = " @drawable/panel_bg "  android:layout_width = " fill_parent "  android:layout_height = " 120.0dip "  android:layout_margin = " 10.0dip " >
                 
< TextView  android:id = " @+id/tvTime "   android:layout_below = " @id/vHDivider2 "  android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 5.0dip "  android:layout_marginTop = " 10.0dip "  android:text = " 报警时间 "  android:layout_alignParentLeft = " true "  android:layout_alignParentTop = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff373737 "  android:id = " @+id/txtTime "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_toRightOf = " @id/tvTime "  android:layout_alignTop = " @id/tvTime "   android:text = ""    />
                
< View  android:id = " @+id/tvViews1 "  android:background = " @drawable/horizontal_separation_line_repeat "  android:layout_width = " fill_parent "  android:layout_height = " 1.0dip "  android:layout_centerVertical = " true "   />
                
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff7d899d "  android:gravity = " center_vertical "  android:id = " @+id/tvInfo "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:text = " 报警处理 "  android:layout_below = " @id/tvViews1 "  android:layout_alignLeft = " @id/tvTime "  android:layout_alignParentBottom = " true "   />
               
< TextView android:textSize = " 16.0sp "  android:textColor = " #ff373737 "  android:id = " @+id/txtInfo "  android:layout_width = " wrap_content "  android:layout_height = " wrap_content "  android:layout_marginLeft = " 10.0dip "  android:layout_toRightOf = " @id/tvInfo "  android:layout_alignTop = " @id/tvInfo "   android:text = ""    />
            
              
</ RelativeLayout >  
                 
< RelativeLayout  android:layout_width = " fill_parent "  android:layout_height = " 70.0dip "  android:layout_margin = " 10.0dip " >
               
        
              
</ RelativeLayout >
              
              
< RelativeLayout 
    android:layout_width
= " fill_parent "  
    android:layout_height
= " fill_parent " >  
             
< ListView android:id = " @+id/ListView02 "    android:layout_x = " 0px "
    android:layout_y
= " 53px "   android:scrollingCache = " false "
     android:layout_width
= " wrap_content "
 android:layout_height
= " wrap_content " ></ ListView >
     
< include layout = " @layout/bottomshow "   />

   

  
</ RelativeLayout >
 
</ LinearLayout >
</ LinearLayout >
 

 

 

你可能感兴趣的:(android)