ms-paint에서 하나의 이미지를 생성하고이를 드로어 블 폴더로 옮겼습니다. 이제 장치 또는 화면 방향에 따라 자동으로 크기가 조정되기를 원합니다.안드로이드 - 자동으로 이미지 크기 조정
또한, 나는 그것을 위해 코드 아래에 텍스트 뷰 내부에이 이미지를 사용하여 사용하고 있습니다 :
text.setText(Html.fromHtml(content, new ImageGetter() {
@Override
public Drawable getDrawable(String source) {
Drawable drawFromPath;
int path = getActivity().getResources().getIdentifier(
source, "drawable",
"com.ssand.app.edu.finaccouting");
drawFromPath = (Drawable) getActivity().getResources()
.getDrawable(path);
drawFromPath.setBounds(0, 0,
drawFromPath.getIntrinsicWidth(),
drawFromPath.getIntrinsicHeight());
return drawFromPath;
}
}, null));
내가 어떻게 이것을 달성 할 수 있습니까?
Html.fromHtml (source, imageGetting, tagHandler)을 사용하는 이유가 있습니까? 나는 ImageView로 레이아웃을 만들 것이다. –
내 TextView 필드의 텍스트는 서식 지정에 HTML 태그를 사용하는 Strings.xml 파일에서옵니다. 그래서 Html.fromHtml을 사용했습니다. – user1767570