rewrited method of calculate picture size;
rewrited method of scroll down to end of log on change log size;
some refactoring in MainActivity.