2017-03-21 188 views
0

嗨,我不擅長設計。我需要以下佈局的幫助。 1-如何在付費(訂閱)旁添加圖片,就像我們添加徽章一樣? 2-如何設置視圖,就像我們在下面的圖像中選擇一個項目時一樣?在開始時顯示一個淺藍色標記。 3-如何添加底部的藍色頁腳行?導航抽屜定製

P.s.我的導航視圖也很慢。任何提示都會有幫助。 enter image description here

+0

1 - 如何添加圖片旁邊的支付(認購) - >刪除填充或利潤率加入到支付的TextView和圖標的ImageView 2):第二個你應該做一個click事件圖像視圖和做動畫 –

+0

對於底部頁腳行添加此XML和調整你的條件 - > <查看 的android:layout_width = 「FILL_PARENT」 機器人:layout_height = 「5DP」 機器人:背景= 「#0000FF」 機器人:id =「@ + id/view」/> –

+0

其實我無法添加圖片。距離不是問題。我不知道如何添加圖像。 –

回答

0

初始化我的導航抽屜時,我做了這個。

gallery=(TextView) MenuItemCompat.getActionView(navigationView.getMenu(). 
      findItem(R.id.menu__pay_subscription)); 

    initializeCountDrawer(); 

然後該方法。

private void initializeCountDrawer(){ 
    gallery.setGravity(Gravity.CENTER_VERTICAL); 
    gallery.setTypeface(null, Typeface.BOLD); 
    gallery.setTextColor(getResources().getColor(R.color.colorAccent)); 
    Drawable img = context.getResources().getDrawable(R.drawable.cards); 
    img.setBounds(0, 0, 200, 40); 
    gallery.setCompoundDrawables(img, null, null, null); 

}