I am working on a project that is supposed to dynamically add buttons. But whenever I launch my application, the power of the application closes. I found out that the problem is that I am trying to add buttons.
package com.Feras.TestProject; import android.app.Activity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup.LayoutParams; import android.widget.Button; import android.widget.LinearLayout; public class TestProject extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); AddAll();
source share