Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

Commit

Permalink
add orientation changes on register screens
Browse files Browse the repository at this point in the history
  • Loading branch information
andriydruk committed May 2, 2016
1 parent 0299254 commit bde8026
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 0 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,10 @@
</activity>
<activity
android:name=".ui.RegistrationsActivity"
android:screenOrientation="portrait"
android:label="@string/title_activity_registrations" >
</activity>
<activity
android:name=".ui.RegisterServiceActivity"
android:screenOrientation="portrait"
android:label="@string/register_new_service" >
</activity>
</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,8 @@ public void onStop() {

private void updateServices() {
List<BonjourService> registeredServices = BonjourApplication.getRegistrationManager(getContext()).getRegisteredServices();
if (registeredServices.size() > 0) {
adapter.swap(registeredServices);
mRecyclerView.setVisibility(View.VISIBLE);
mNoServiceView.setVisibility(View.GONE);
} else {
mRecyclerView.setVisibility(View.GONE);
mNoServiceView.setVisibility(View.VISIBLE);
}
adapter.swap(registeredServices);
mNoServiceView.setVisibility(registeredServices.size() > 0 ? View.GONE : View.VISIBLE);
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/res/layout/blank_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"/>
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

</android.support.design.widget.CoordinatorLayout>

0 comments on commit bde8026

Please sign in to comment.