如何调整屏幕大小以使其更集中在页面上
initial_screen.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<item
android:drawable="@android:color/white"/>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/fsa2"/>
</item>
</layer-list>
答案 0 :(得分:1)
您可以使用ImageView并将其可绘制资源设置为:
if (a+b<=c)
{
JOptionPane.showMessageDialog(null,"Invalid Triangle");
} else if (a==c) {
JOptionPane.showMessageDialog(null,"Triangle is Equilateral");
} else if (a==b || b==c){
JOptionPane.showMessageDialog(null, "Triangle is Isosceles");
} else {
JOptionPane.showMessageDialog(null,"Triangle is Scalene");
}