Note that there are some explanatory texts on larger screens.

plurals
  1. POLayoutInflater NullPointerException
    primarykey
    data
    text
    <p>I am trying to refresh my custom ListViewAdapter;</p> <p><strong>Edit :</strong> </p> <p><strong>When I click an item in Listview it is calling the GoruntuleActivity's screen and creating oncreate method (I am assuming it is creating..) and then I call a method of GoruntuleActivity and the layputInflater is into this Activity.</strong></p> <p><strong>ListeleActivity.java</strong></p> <pre><code>lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; parent, View item, int position, long id) { onClickPosition = position; final Intent intent = new Intent(ListeleActivity.this, GoruntuleActivity.class); startActivity(intent); goruntuleNesnesi.isSetListRefresh(onClickPosition , issetlist); } }); </code></pre> <p><strong>and it is calling the method of GoruntuleActivity.java</strong></p> <pre><code> public void isSetListRefresh(int onClickPosition, ArrayList&lt;String&gt; issetlist ) { issetlist.set(onClickPosition, "false"); setRecentOrSeen(issetlist); ListviewRefresh(); } public void ListviewRefresh() { LayoutInflater mLInflater = LayoutInflater.from(this); ListViewAdapter adapter = new ListViewAdapter( getApplicationContext(), getKimdenList(), getKonuList(), getRecentOrSeen() , mLInflater); adapter.Remove(); } </code></pre> <p><strong>And now it is giving me another Exception..</strong></p> <pre><code>05-18 16:25:22.073: E/AndroidRuntime(807): FATAL EXCEPTION: main 05-18 16:25:22.073: E/AndroidRuntime(807): java.lang.IllegalStateException: System services not available to Activities before onCreate() 05-18 16:25:22.073: E/AndroidRuntime(807): at android.app.Activity.getSystemService(Activity.java:3526) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.view.LayoutInflater.from(LayoutInflater.java:171) 05-18 16:25:22.073: E/AndroidRuntime(807): at com.mobil.eposta.GoruntuleActivity.ListviewRefresh(GoruntuleActivity.java:160) 05-18 16:25:22.073: E/AndroidRuntime(807): at com.mobil.eposta.GoruntuleActivity.isSetListRefresh(GoruntuleActivity.java:155) 05-18 16:25:22.073: E/AndroidRuntime(807): at com.mobil.eposta.ListeleActivity$1.onItemClick(ListeleActivity.java:137) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.widget.AdapterView.performItemClick(AdapterView.java:284) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.widget.ListView.performItemClick(ListView.java:3382) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.os.Handler.handleCallback(Handler.java:587) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.os.Handler.dispatchMessage(Handler.java:92) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.os.Looper.loop(Looper.java:123) 05-18 16:25:22.073: E/AndroidRuntime(807): at android.app.ActivityThread.main(ActivityThread.java:4627) 05-18 16:25:22.073: E/AndroidRuntime(807): at java.lang.reflect.Method.invokeNative(Native Method) 05-18 16:25:22.073: E/AndroidRuntime(807): at java.lang.reflect.Method.invoke(Method.java:521) 05-18 16:25:22.073: E/AndroidRuntime(807): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 05-18 16:25:22.073: E/AndroidRuntime(807): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 05-18 16:25:22.073: E/AndroidRuntime(807): at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload