| | |
| | | |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.content.SharedPreferences; |
| | | import android.os.Bundle; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | import android.widget.Button; |
| | | |
| | | import androidx.appcompat.app.AppCompatActivity; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | |
| | | private RecyclerView recyclerView; |
| | | private List<Item> items; |
| | | private ItemAdapter adapter; |
| | | private Button addItem; |
| | | SocketManager socketManager; |
| | | |
| | | @Override |
| | |
| | | super.onCreate(savedInstanceState); |
| | | setContentView(R.layout.activity_start); |
| | | |
| | | addItem = findViewById(R.id.addbtn); |
| | | |
| | | |
| | | recyclerView = findViewById(R.id.recyclerView); |
| | | recyclerView.setLayoutManager(new LinearLayoutManager(this)); |
| | | |
| | | addItem.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = new Intent(StartActivity.this, EditeActivity.class); |
| | | startActivity(intent); |
| | | } |
| | | }); |
| | | |
| | | items = new ArrayList<>(); |
| | | |
| | | adapter = new ItemAdapter(items); |