|
3 | 3 | import android.os.Bundle;
|
4 | 4 | import android.view.MenuItem;
|
5 | 5 |
|
| 6 | +import android.view.View; |
6 | 7 | import androidx.appcompat.app.AppCompatDelegate;
|
7 | 8 |
|
8 |
| -import androidx.appcompat.widget.Toolbar; |
9 |
| -import butterknife.BindView; |
10 |
| -import butterknife.ButterKnife; |
11 |
| -import fr.free.nrw.commons.R; |
| 9 | +import fr.free.nrw.commons.databinding.ActivitySettingsBinding; |
12 | 10 | import fr.free.nrw.commons.theme.BaseActivity;
|
13 | 11 |
|
14 | 12 | /**
|
15 | 13 | * allows the user to change the settings
|
16 | 14 | */
|
17 | 15 | public class SettingsActivity extends BaseActivity {
|
| 16 | + |
| 17 | + private ActivitySettingsBinding binding; |
18 | 18 | private AppCompatDelegate settingsDelegate;
|
19 |
| - @BindView(R.id.toolbar) |
20 |
| - Toolbar toolbar; |
21 | 19 | /**
|
22 | 20 | * to be called when the activity starts
|
23 | 21 | * @param savedInstanceState the previously saved state
|
24 | 22 | */
|
25 | 23 | @Override
|
26 | 24 | protected void onCreate(Bundle savedInstanceState) {
|
27 | 25 | super.onCreate(savedInstanceState);
|
28 |
| - setContentView(R.layout.activity_settings); |
| 26 | + binding = ActivitySettingsBinding.inflate(getLayoutInflater()); |
| 27 | + final View view = binding.getRoot(); |
| 28 | + setContentView(view); |
29 | 29 |
|
30 |
| - ButterKnife.bind(this); |
31 |
| - setSupportActionBar(toolbar); |
| 30 | + setSupportActionBar(binding.toolbarBinding.toolbar); |
32 | 31 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
33 | 32 | }
|
34 | 33 |
|
|
0 commit comments