2017-06-02 36 views

回答

0

你的描述是隐藏在TOP_LEFT角落所以使用的代码否则不要设置说明现在的位置是我的模拟器的高度是1280,重量为720

//get the height and width of the device 
    DisplayMetrics ds = new DisplayMetrics(); 
    this.getWindowManager().getDefaultDisplay().getMetrics(ds); 
    int width = ds.widthPixels; 
    int height = ds.heightPixels; 

    //set the custom description postion 
    Description desc = new Description(); 
    desc.setText("Hai"); 
    desc.setTextSize(13f); 
    desc.setPosition(width - 50,height - 175); 
    graph.setDescription(desc); 

下图“海”是图的描述

Hai is a description

desc.setPosition(宽度 - 50,高度 - 1250); //图:2描述是在最右边的角落显示

position Top Right just change the number

“海” 文字是描述