2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Rename list layout

Summary: Give it a proper name

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12289
This commit is contained in:
Nicolas Fella 2018-04-17 20:50:17 +02:00
parent 9837c89f35
commit bc330018e1
4 changed files with 6 additions and 16 deletions

View File

@ -1,10 +0,0 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:addStatesFromChildren="true"
android:orientation="vertical"
android:paddingLeft="16dip"
android:paddingRight="16dip"
tools:context="org.kde.kdeconnect.UserInterface.MainActivity" />

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent">
<ListView
android:id="@+id/listView1"
android:id="@+id/devices_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:addStatesFromChildren="true"

View File

@ -124,7 +124,7 @@ public class ShareActivity extends AppCompatActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
ListView list = (ListView) findViewById(R.id.listView1);
ListView list = (ListView) findViewById(R.id.devices_list);
list.setAdapter(new ListAdapter(ShareActivity.this, items));
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
@ -145,7 +145,7 @@ public class ShareActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_refresh_list);
setContentView(R.layout.devices_list);
ActionBar actionBar = getSupportActionBar();
mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.refresh_list_layout);

View File

@ -75,8 +75,8 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
setHasOptionsMenu(true);
rootView = inflater.inflate(R.layout.activity_refresh_list, container, false);
View listRootView = rootView.findViewById(R.id.listView1);
rootView = inflater.inflate(R.layout.devices_list, container, false);
View listRootView = rootView.findViewById(R.id.devices_list);
mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_list_layout);
mSwipeRefreshLayout.setOnRefreshListener(
new SwipeRefreshLayout.OnRefreshListener() {
@ -195,7 +195,7 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
items.remove(items.size() - 1); //Remove remembered devices section if empty
}
final ListView list = (ListView) rootView.findViewById(R.id.listView1);
final ListView list = (ListView) rootView.findViewById(R.id.devices_list);
//Store current scroll
int index = list.getFirstVisiblePosition();