2

我用這個Material Design Toolbar爲我的項目。問號而不是RTL字段

但我有2個問題:

  1. 當我使用一個RTL字符串的標籤名稱,它不顯示字符串正確

    private String titles[] = new String[]{"تست", "Sample Tab 2", "Sample Tab 3", "Sample Tab 4" 
        , "Sample Tab 5", "Sample Tab 6", "Sample Tab 7", "Sample Tab 8"}; 
    

    裏面的OnCreate:

    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); 
    mDrawerList = (ListView) findViewById(R.id.navdrawer); 
    toolbar = (Toolbar) findViewById(R.id.toolbar); 
    if (toolbar != null) { 
        setSupportActionBar(toolbar); 
        toolbar.setNavigationIcon(R.drawable.ic_ab_drawer); 
    } 
    pager = (ViewPager) findViewById(R.id.viewpager); 
    slidingTabLayout = (SlidingTabLayout) findViewById(R.id.sliding_tabs); 
    pager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager(), titles)); 
    

    This顯示:

    enter image description here

    1. 如何在API 17下使用android:supportsRtl="true"?或從右側打開材質滑動菜單。 我改變容器重力Right,並從右側拖動絲毫正確打開,但打開通過切換在工具欄
    2. 返回錯誤

回答

0

由於@anil最後我找到了問題,有兩種方式:

  1. 變化的源文件編碼在Settings>File Encoding

enter image description here

如果問題沒有解決:

  • 首先方式 +從資源使用字符串(R.String.nameOfString),而不是直接在Java源代碼鍵入它們