解决方案 »

  1.   

    呵呵,这个打空格的想法有点搞笑噶
    你这个列表,应该是ListVierw做的吧,然后,你每一行,不要用TextView,而应该是一个RelativeLayout,里面嵌入两个TextView,一个处于父容器的左边,一个右边
      

  2.   

    一楼正解。
    我正好有个项目是要用正则表达式把字母改成空格,
    是这样的:   .replaceAll("[A-Z]", "   ")); 就OK了
      

  3.   

    建议最好用线性布局,
    实现方法<LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
             >
            <TextView 
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="宫保鸡丁"
                android:layout_weight="1"
                />
            <TextView 
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="10元"
                />
                </LinearLayout>
    直接帖过去用就好了。
      

  4.   

    可以直接用tablelayout来做
      

  5.   

    办法多得是,就拿1个textView来说,也可以处理的,思路入下:
    你事先得估摸好一个固定长度,使用textView刚好显示,就拿长度为MaxLength来说,拼凑一下
    String mItemText= “宫保鸡丁”+fun()+“10元”    然后设置居中对齐,这样每行长度都一样,看着整齐
    fun方法的作用是返回 MaxLength-"宫保鸡丁".length()-"10元".length() 个空格就ok拉
       效果你可想像,每行都是一样长,并且名字在左边,价格在右边,避免了使用多个组件
        当然取值也很方便,getText()后,按空格拆分就得到了菜名和价格了
      
      

  6.   

    一楼正解,一个容器中两个TextView,分别对两个TextView进行靠右、靠左对齐就好了