The below code needs API 11 - how would I write this to support API level 1? I just want to relocate a view.
ImageView imageviewLogo = (ImageView)findViewById(R.id.imageViewLogo);
imageviewLogo.setY(imageviewLogo.getHeight());
The below code needs API 11 - how would I write this to support API level 1? I just want to relocate a view.
ImageView imageviewLogo = (ImageView)findViewById(R.id.imageViewLogo);
imageviewLogo.setY(imageviewLogo.getHeight());
You'd need to update the margins and use that to relocate the view. Here is a good example taken from here:
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
lp.setMargins(left, top, right, bottom);
imageView.setLayoutParams(lp);
and perhaps invalidate layout after the margins are updated.