mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
* Moved Main Activity and Settings Activity to ViewBinding * Moving only SettingsActivity for now * Removed values-yue-hant directory * Removing previously done changes to main.xml
This commit is contained in:
parent
fec6dba341
commit
bd06a74caa
2 changed files with 11 additions and 10 deletions
|
|
@ -3,21 +3,19 @@ package fr.free.nrw.commons.settings;
|
|||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.databinding.ActivitySettingsBinding;
|
||||
import fr.free.nrw.commons.theme.BaseActivity;
|
||||
|
||||
/**
|
||||
* allows the user to change the settings
|
||||
*/
|
||||
public class SettingsActivity extends BaseActivity {
|
||||
|
||||
private ActivitySettingsBinding binding;
|
||||
private AppCompatDelegate settingsDelegate;
|
||||
@BindView(R.id.toolbar)
|
||||
Toolbar toolbar;
|
||||
/**
|
||||
* to be called when the activity starts
|
||||
* @param savedInstanceState the previously saved state
|
||||
|
|
@ -25,10 +23,11 @@ public class SettingsActivity extends BaseActivity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_settings);
|
||||
binding = ActivitySettingsBinding.inflate(getLayoutInflater());
|
||||
final View view = binding.getRoot();
|
||||
setContentView(view);
|
||||
|
||||
ButterKnife.bind(this);
|
||||
setSupportActionBar(toolbar);
|
||||
setSupportActionBar(binding.toolbarBinding.toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
android:id="@+id/toolbarLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="?attr/actionBarSize">
|
||||
<include layout="@layout/toolbar" />
|
||||
<include
|
||||
android:id="@+id/toolbarBinding"
|
||||
layout="@layout/toolbar" />
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue