mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +00:00
Fix list view bugs (mostly Ouya related)
This commit is contained in:
parent
155432b4b8
commit
9e20d25093
@ -34,7 +34,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
|
|||||||
public static final class drawable {
|
public static final class drawable {
|
||||||
public static final int app_icon=0x7f020000;
|
public static final int app_icon=0x7f020000;
|
||||||
public static final int ic_launcher=0x7f020001;
|
public static final int ic_launcher=0x7f020001;
|
||||||
public static final int list_view_border=0x7f020002;
|
public static final int list_view_unselected=0x7f020002;
|
||||||
public static final int ouya_icon=0x7f020003;
|
public static final int ouya_icon=0x7f020003;
|
||||||
}
|
}
|
||||||
public static final class id {
|
public static final class id {
|
||||||
|
Binary file not shown.
@ -3,5 +3,5 @@
|
|||||||
android:shape="rectangle" >
|
android:shape="rectangle" >
|
||||||
|
|
||||||
<stroke android:width="1dip" android:color="#ffffff"/>
|
<stroke android:width="1dip" android:color="#ffffff"/>
|
||||||
|
|
||||||
</shape>
|
</shape>
|
@ -9,18 +9,17 @@
|
|||||||
tools:context=".AppView" >
|
tools:context=".AppView" >
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:id="@+id/pcListView"
|
android:id="@+id/pcListView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_below="@+id/appListText"
|
android:layout_below="@+id/appListText"
|
||||||
android:fastScrollEnabled="true"
|
android:fastScrollEnabled="true"
|
||||||
android:longClickable="false"
|
android:longClickable="false"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:background="@drawable/list_view_unselected"
|
||||||
android:stackFromBottom="false">
|
android:stackFromBottom="false">
|
||||||
|
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -31,6 +30,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
android:text="Applications" />
|
android:text="Applications" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -9,17 +9,17 @@
|
|||||||
tools:context=".PcView" >
|
tools:context=".PcView" >
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:id="@+id/pcListView"
|
android:id="@+id/pcListView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_below="@+id/discoveryText"
|
android:layout_below="@+id/discoveryText"
|
||||||
|
android:background="@drawable/list_view_unselected"
|
||||||
android:fastScrollEnabled="true"
|
android:fastScrollEnabled="true"
|
||||||
android:longClickable="false"
|
android:longClickable="false"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:stackFromBottom="false" >
|
||||||
android:stackFromBottom="false">
|
|
||||||
|
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|
||||||
@ -31,6 +31,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_below="@+id/settingsButton"
|
android:layout_below="@+id/settingsButton"
|
||||||
android:paddingTop="20dp"
|
android:paddingTop="20dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
android:text="Discovered PC List" />
|
android:text="Discovered PC List" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/rowTextView"
|
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:textSize="16sp"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/list_view_border"
|
|
||||||
android:textIsSelectable="false" >
|
<TextView
|
||||||
|
android:id="@+id/rowTextView"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:textSize="16sp" >
|
||||||
|
</TextView>
|
||||||
|
|
||||||
</TextView>
|
</LinearLayout>
|
||||||
|
@ -67,9 +67,10 @@ public class AppView extends Activity {
|
|||||||
|
|
||||||
// Setup the list view
|
// Setup the list view
|
||||||
appList = (ListView)findViewById(R.id.pcListView);
|
appList = (ListView)findViewById(R.id.pcListView);
|
||||||
appListAdapter = new ArrayAdapter<AppObject>(this, R.layout.simplerow);
|
appListAdapter = new ArrayAdapter<AppObject>(this, R.layout.simplerow, R.id.rowTextView);
|
||||||
appListAdapter.setNotifyOnChange(false);
|
appListAdapter.setNotifyOnChange(false);
|
||||||
appList.setAdapter(appListAdapter);
|
appList.setAdapter(appListAdapter);
|
||||||
|
appList.setItemsCanFocus(true);
|
||||||
appList.setOnItemClickListener(new OnItemClickListener() {
|
appList.setOnItemClickListener(new OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> arg0, View arg1, int pos,
|
public void onItemClick(AdapterView<?> arg0, View arg1, int pos,
|
||||||
|
@ -86,9 +86,10 @@ public class PcView extends Activity {
|
|||||||
// Setup the list view
|
// Setup the list view
|
||||||
settingsButton = (Button)findViewById(R.id.settingsButton);
|
settingsButton = (Button)findViewById(R.id.settingsButton);
|
||||||
pcList = (ListView)findViewById(R.id.pcListView);
|
pcList = (ListView)findViewById(R.id.pcListView);
|
||||||
pcListAdapter = new ArrayAdapter<ComputerObject>(this, R.layout.simplerow);
|
pcListAdapter = new ArrayAdapter<ComputerObject>(this, R.layout.simplerow, R.id.rowTextView);
|
||||||
pcListAdapter.setNotifyOnChange(false);
|
pcListAdapter.setNotifyOnChange(false);
|
||||||
pcList.setAdapter(pcListAdapter);
|
pcList.setAdapter(pcListAdapter);
|
||||||
|
pcList.setItemsCanFocus(true);
|
||||||
pcList.setOnItemClickListener(new OnItemClickListener() {
|
pcList.setOnItemClickListener(new OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> arg0, View arg1, int pos,
|
public void onItemClick(AdapterView<?> arg0, View arg1, int pos,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user