diff --git a/app/build.gradle b/app/build.gradle index aca4b2a..60f6666 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -71,7 +71,6 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:rules:1.2.0' @@ -82,5 +81,4 @@ dependencies { androidTestImplementation "androidx.arch.core:core-testing:$rootProject.androidxArchVersion" androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion" - testImplementation 'org.mockito:mockito-core:2.19.0' } diff --git a/app/src/main/java/it/unisannio/ding/ids/wedroid/app/view/BoardViewActivity.java b/app/src/main/java/it/unisannio/ding/ids/wedroid/app/view/BoardViewActivity.java index a9f957e..2b147a9 100644 --- a/app/src/main/java/it/unisannio/ding/ids/wedroid/app/view/BoardViewActivity.java +++ b/app/src/main/java/it/unisannio/ding/ids/wedroid/app/view/BoardViewActivity.java @@ -50,26 +50,16 @@ public class BoardViewActivity extends AppCompatActivity { protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_board_view); - myToolbar = findViewById(R.id.my_toolbar); + + findViews(); + setSupportActionBar(myToolbar); - swipeRefreshLayout = findViewById(R.id.pullToRefresh); swipeRefreshLayout.setRefreshing(false); Intent i = getIntent(); idBoard = i.getStringExtra("idBoard"); - getListsButton = findViewById(R.id.getLists); - description = findViewById(R.id.descriptionTxt); - members = findViewById(R.id.membersTxt); - permission = findViewById(R.id.permissionTxt); - creationDate = findViewById(R.id.createdDate); - lastModificationDate = findViewById(R.id.modifiedDate); - divider1 = findViewById(R.id.divider1); - divider2 = findViewById(R.id.divider2); - divider3 = findViewById(R.id.divider3); - listView = findViewById(R.id.listViewID); - sp = new SharedPreferenceHelper(this); sp.setBoardId(idBoard); @@ -95,6 +85,21 @@ public class BoardViewActivity extends AppCompatActivity { }); } + private void findViews() { + myToolbar = findViewById(R.id.my_toolbar); + getListsButton = findViewById(R.id.getLists); + description = findViewById(R.id.descriptionTxt); + members = findViewById(R.id.membersTxt); + permission = findViewById(R.id.permissionTxt); + creationDate = findViewById(R.id.createdDate); + lastModificationDate = findViewById(R.id.modifiedDate); + divider1 = findViewById(R.id.divider1); + divider2 = findViewById(R.id.divider2); + divider3 = findViewById(R.id.divider3); + listView = findViewById(R.id.listViewID); + swipeRefreshLayout = findViewById(R.id.pullToRefresh); + } + private void initializeUI(String idBoard) { service = new ServicesFactory(sp); service.getBoardService().getBoard(idBoard).enqueue(new Callback() {