我要使用此代码从头到尾放置n张图像
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
height = displayMetrics.heightPixels;
width = displayMetrics.widthPixels;
width_imagine =(int) (width/n);
LinearLayout.LayoutParams layoutParams = new
LinearLayout.LayoutParams(width_imagine, 100);
imagine.setLayoutParams(layoutParams);
因为操作栏在那里,我无法获得精确的宽度。 enter image description here 如何获得整个屏幕的宽度?
答案 0 :(得分:0)
尝试此代码:
program substituire_A;
var s:string; i:integer;
begin writeln('Dati sirul');
readln(s); for i:=1 to length(s) do
if s[i]='A' then s[i]:='*';
writeln('sirul obtinut este=',s);
readln`enter code here`
end.