Форум программистов, компьютерный форум CyberForum.ru

Не обновляется список после добавления item'a на страницу ViewPager? - Android

Войти
Регистрация
Восстановить пароль
Другие темы раздела
Android EditText читает цифры наоборот http://www.cyberforum.ru/android-dev/thread1562559.html
Вписываю цифры, но почему-то EditText читает их наоборот. Я вписывал 523, а оно считало их как 325. Почему такое происходит? Добавил screen и код. Помогите, не знаю в чем в чем проблема :( import java.text.DecimalFormat; import java.util.ArrayList; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.os.Bundle; import...
Android Открытие Whatsapp интентом Добрый день, возможно ли открыть интентом список чатов в Whatsapp из сторонней аппликации? Из примеров в гугле получается открыть список контактов но не список чатов. Вот мой код: Intent whatsappIntent = new Intent(Intent.ACTION_SEND); whatsappIntent.setType("text/plain"); whatsappIntent.setPackage("com.whatsapp"); ... http://www.cyberforum.ru/android-dev/thread1562524.html
Массив ссылок на изображения из ресурсов Android
Подскажите как сформировать массив ссылок на изображения из ресурсов проекта. Необходимо для чтения изображения схем и дальнейшего их вывода в ListView.
Как поставить тему Material? Android
Я много раз пытался сделать это разными способами но ничего не получалось... Может вы подскажете?
Android Как зарабатывать на размещении рекламы в своем приложении Play Market? http://www.cyberforum.ru/android-dev/thread1562453.html
Здравствуйте, уважаемые программисты! Не могли бы вы мне помочь? Я ного всего читал в интернете... Итак,чтобы зарабатывать деньги на андроид-приложениях нужно: 1. Зарегеистрироваться как разработчик 2. Выложить свое приложение с рекламой 3. ... А что дальше?.. Деньги сами будут приходить на карту, или нужно регистрировать юридическое лицо? Подскажите пожалуйста! Заранее спасибо!
Android Передвижение картинки нажатием на кнопку Доброе утро... Вобщем, помогите) Я хочу чтобы изображение передвигалось по Х, например при нажатии кнопки. Как это можно реализовать? подробнее

Показать сообщение отдельно
disx
18 / 18 / 0
Регистрация: 26.02.2014
Сообщений: 450
31.10.2015, 09:23  [ТС]     Не обновляется список после добавления item'a на страницу ViewPager?
в самом низу onResume и два варианта:

при первом такое:
Кликните здесь для просмотра всего текста
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: FATAL EXCEPTION: main
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: java.lang.NullPointerException
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at com.photocrib.FirstFragment.onResume(FirstFragment.java:249)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.app.Fragment.performResume(Fragment.java:1829)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:983)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:486)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.view.ViewPager.populate(ViewPager.java:1073)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.view.ViewPager.populate(ViewPager.java:919)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1441)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:851)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:453)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2092)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1064)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.os.Looper.loop(Looper.java:137)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:4424)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:511)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-31 10:10:21.016 15489-15489/com.photocrib E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)


при втором такое:

Кликните здесь для просмотра всего текста
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: FATAL EXCEPTION: main
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: java.lang.NullPointerException
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at com.photocrib.FirstFragment.onResume(FirstFragment.java:252)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.app.Fragment.performResume(Fragment.java:1829)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:983)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:486)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.view.ViewPager.populate(ViewPager.java:1073)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.view.ViewPager.populate(ViewPager.java:919)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1441)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:851)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:453)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2092)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.View.measure(View.java:12723)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1064)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.os.Looper.loop(Looper.java:137)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:4424)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:511)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-31 10:12:30.786 17741-17741/com.photocrib E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
10-31 10:12:31.140 17741-17746/com.photocrib I/dalvikvm: threadid=3: reacting to signal 3
10-31 10:12:31.147 17741-17746/com.photocrib I/dalvikvm: Wrote stack traces to '/data/anr/traces.txt'
10-31 10:12:31.257 17741-17809/com.photocrib W/System.err: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
10-31 10:12:31.257 17741-17809/com.photocrib W/System.err: at android.os.Handler.<init>(Handler.java:121)
10-31 10:12:31.257 17741-17809/com.photocrib W/System.err: at android.support.v4.content.Loader$ForceLoadContentObserver.<init>(Loader.java:53)
10-31 10:12:31.257 17741-17809/com.photocrib W/System.err: at android.support.v4.content.CursorLoader.<init>(CursorLoader.java:88)
10-31 10:12:31.257 17741-17809/com.photocrib W/System.err: at com.photocrib.FirstFragment$MyCursorLoader.<init>(FirstFragment.java:220)
10-31 10:12:31.267 17741-17809/com.photocrib W/System.err: at com.photocrib.FirstFragment$MakeList.doInBackground(FirstFragment.java:99)
10-31 10:12:31.336 17741-17746/com.photocrib I/dalvikvm: threadid=3: reacting to signal 3
10-31 10:12:31.346 17741-17746/com.photocrib I/dalvikvm: Wrote stack traces to '/data/anr/traces.txt'
10-31 10:12:31.476 17741-17809/com.photocrib W/System.err: at com.photocrib.FirstFragment$MakeList.doInBackground(FirstFragment.java:84)
10-31 10:12:31.516 17741-17809/com.photocrib W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:264)
10-31 10:12:31.546 17741-17809/com.photocrib W/System.err: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
10-31 10:12:31.546 17741-17809/com.photocrib W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:137)
10-31 10:12:31.566 17741-17809/com.photocrib W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
10-31 10:12:31.616 17741-17809/com.photocrib W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
10-31 10:12:31.636 17741-17809/com.photocrib W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
10-31 10:12:31.736 17741-17809/com.photocrib W/System.err: at java.lang.Thread.run(Thread.java:856)


а чо не так-то?
 
Текущее время: 09:59. Часовой пояс GMT +3.
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Рейтинг@Mail.ru