mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +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:
@@ -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" />
|
|
@@ -6,7 +6,7 @@
|
|||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/listView1"
|
android:id="@+id/devices_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:addStatesFromChildren="true"
|
android:addStatesFromChildren="true"
|
@@ -124,7 +124,7 @@ public class ShareActivity extends AppCompatActivity {
|
|||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
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.setAdapter(new ListAdapter(ShareActivity.this, items));
|
||||||
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -145,7 +145,7 @@ public class ShareActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_refresh_list);
|
setContentView(R.layout.devices_list);
|
||||||
|
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.refresh_list_layout);
|
mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.refresh_list_layout);
|
||||||
|
@@ -75,8 +75,8 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
|
|||||||
|
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
rootView = inflater.inflate(R.layout.activity_refresh_list, container, false);
|
rootView = inflater.inflate(R.layout.devices_list, container, false);
|
||||||
View listRootView = rootView.findViewById(R.id.listView1);
|
View listRootView = rootView.findViewById(R.id.devices_list);
|
||||||
mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_list_layout);
|
mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_list_layout);
|
||||||
mSwipeRefreshLayout.setOnRefreshListener(
|
mSwipeRefreshLayout.setOnRefreshListener(
|
||||||
new SwipeRefreshLayout.OnRefreshListener() {
|
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
|
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
|
//Store current scroll
|
||||||
int index = list.getFirstVisiblePosition();
|
int index = list.getFirstVisiblePosition();
|
||||||
|
Reference in New Issue
Block a user