本文整理汇总了Java中com.echo.holographlibrary.BarGraph类的典型用法代码示例。如果您正苦于以下问题:Java BarGraph类的具体用法?Java BarGraph怎么用?Java BarGraph使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BarGraph类属于com.echo.holographlibrary包,在下文中一共展示了BarGraph类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.echo.holographlibrary.BarGraph; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
graph = (BarGraph) findViewById(R.id.graph);
startBenchmarks = (Button) findViewById(R.id.startBenchmarks);
progressBar = (ProgressBar) findViewById(R.id.progress);
task = (StatisticsTask) getLastNonConfigurationInstance();
if (task != null) {
task.setListener(this);
}
startBenchmarks.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
task = new StatisticsTask(getAssets());
task.setListener(MainActivity.this);
task.execute();
}
});
}
开发者ID:evant,项目名称:parsnip,代码行数:23,代码来源:MainActivity.java
示例2: initBarGraph
import com.echo.holographlibrary.BarGraph; //导入依赖的package包/类
/**
* 棒グラフを初期化する。
*/
private void initBarGraph() {
ArrayList<Bar> points = new ArrayList<Bar>();
points.add(createPointForBar("#99CC00", "X社", 11));
points.add(createPointForBar("#990000", "Y社", 7));
BarGraph barGraph = (BarGraph) findViewById(R.id.bargraph);
barGraph.setBars(points);
barGraph.setOnBarClickedListener(new OnBarClickedListener() {
@Override
public void onClick(int index) {
}
});
}
开发者ID:android-opensource-library-56,项目名称:android-opensource-library-56,代码行数:19,代码来源:HoloGraphLibrarySampleActivity.java
示例3: drawHistory
import com.echo.holographlibrary.BarGraph; //导入依赖的package包/类
private void drawHistory() {
final ArrayList<Bar> points = new ArrayList<Bar>();
for (DayHistory dh : history.getLastWeek()) {
Bar d = new Bar();
d.setColor(getActivity().getResources().getColor(R.color.graph_history));
SimpleDateFormat formatter=new SimpleDateFormat("E");
if(dh != null) {
d.setName(formatter.format(dh.getCalendar().getTime()));
d.setValue(dh.getTotalSteps());
if(dayOfWeek == dh.getCalendar().get(Calendar.DAY_OF_WEEK)) {
d.setColor(getActivity().getResources().getColor(R.color.graph_history_selected));
} else {
d.setSelectedColor(getActivity().getResources().getColor(R.color.graph_history_selected));
}
} else {
d.setName("...");
d.setValue(0);
}
points.add(d);
}
final BarGraph g = (BarGraph)getActivity().findViewById(R.id.graph_history);
g.setOnBarClickedListener(new BarGraph.OnBarClickedListener() {
@Override
public void onClick(int index) {
Bar c = points.get(index);
mListener.setCurrentDay(batteryLevel, history, weekday2int(c.getName()));
}
});
g.setBars(points);
}
开发者ID:dgomes,项目名称:openvidonn,代码行数:38,代码来源:CurrentFragment.java
示例4: displayGraph
import com.echo.holographlibrary.BarGraph; //导入依赖的package包/类
@Override
public void displayGraph(List<Bar> points) {
BarGraph graph = (BarGraph)getActivity().findViewById(R.id.graph);
graph.setBars((ArrayList<Bar>) points);
}
开发者ID:ajitsing,项目名称:ExpenseManager,代码行数:6,代码来源:CurrentMonthExpenseFragment.java
注:本文中的com.echo.holographlibrary.BarGraph类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论