zyqcome / vudroid

Automatically exported from code.google.com/p/vudroid
0 stars 0 forks source link

NPE if Go to page edit box is empty #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Открыли pdf
2.Выбрали "Go to page"
3.Нажали "Go to page!"

What is the expected output? What do you see instead?
Окошко должно просто закрыться если в нем 
ничего не ввели, а у нас выпадает "Ой! 
Приложене неожиданно остановилось"

What version of the product are you using? On what operating system?
VuDroid v1.1 OS v2.1

Please provide any additional information below.
Desire 1.21.405.2

Original issue reported on code.google.com by hitagara on 10 Jun 2010 at 5:57

GoogleCodeExporter commented 8 years ago
Кроме того! Закрепите это окошко поиска и 
ограничьте размер вводимого размером 
соответствующего типа, т.к. есни вбивать 
туда оооочень большое число, то окошко 
исказится и вылезет за границы экрана, и по 
вводу тоже вызовет "Ой! Приложене 
неожиданно остановилось"

Original comment by hitagara on 10 Jun 2010 at 6:52

GoogleCodeExporter commented 8 years ago
P.S. Please use english for issue discussions.

Original comment by pavel.ti...@gmail.com on 10 Jun 2010 at 4:05

GoogleCodeExporter commented 8 years ago
If you use the "Go to page" menu item, leave the input empty, and push the "Go 
to Page!" button, then vudroid crashes with the following alert.

Sorry!
The application VuDroid (process org.vudroid) has stopped unexpectedly.  Please 
try again.
Force close

Attached is a patch that fixes this problem.  The change is shown below.

OLD:        final int pageNumber = Integer.parseInt(text.getText().toString());
NEW:        final int pageNumber = (text.getText().length() == 0) ?
NEW:            0 :
NEW:            Integer.parseInt(text.getText().toString());

Original comment by BenColl...@gmail.com on 25 Dec 2011 at 8:01

Attachments: