Skip to content

Commit

Permalink
- Custom scrollbar fixes
Browse files Browse the repository at this point in the history
- Fixes for long name files, directories, processes in lists

Signed-off-by: Igor Dulevich <gamba69@gmail.com>
  • Loading branch information
gamba69 committed Dec 9, 2011
1 parent b3a8340 commit f62d5ff
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
8 changes: 4 additions & 4 deletions res/layout/flist_layout.xml
Expand Up @@ -4,20 +4,20 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/normal_bg" android:paddingTop="2dp" android:paddingBottom="2dp">
<ImageView android:src="@drawable/dir_ok" android:background="@color/normal_bg" android:layout_width="wrap_content" android:id="@+id/fl_icon" android:layout_height="fill_parent" android:layout_marginLeft="4dp"></ImageView>
<ImageView android:src="@drawable/dir_ok" android:background="@color/normal_bg" android:layout_width="wrap_content" android:id="@+id/fl_icon" android:layout_height="wrap_content" android:layout_marginLeft="4dp" android:layout_gravity="top|left"></ImageView>
<LinearLayout
android:id="@+id/fl_holder"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:background="@color/normal_bg"
android:orientation="vertical" >
android:orientation="vertical" android:layout_gravity="top|left">

<TextView
android:id="@+id/fl_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:background="@color/normal_transparent"
android:gravity="center_vertical"
Expand Down
10 changes: 5 additions & 5 deletions res/layout/results_item.xml
Expand Up @@ -4,18 +4,18 @@
android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingBottom="2dp" android:paddingTop="2dp" android:background="@color/normal_bg">

<ImageView android:src="@drawable/dir_ok" android:background="@color/normal_bg" android:layout_width="wrap_content" android:id="@+id/res_icon" android:layout_height="fill_parent" android:layout_marginLeft="4dp"></ImageView>
<ImageView android:src="@drawable/dir_ok" android:background="@color/normal_bg" android:layout_width="wrap_content" android:id="@+id/res_icon" android:layout_height="wrap_content" android:layout_marginLeft="4dp" android:layout_gravity="top|left"></ImageView>

<LinearLayout
android:id="@+id/res_holder"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:background="@color/normal_bg"
android:orientation="vertical" >
android:orientation="vertical" android:layout_gravity="top|left">

<TextView android:gravity="center_vertical" android:layout_height="fill_parent" android:text="Filename" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/normal_fg" android:background="@color/normal_transparent" android:id="@+id/res_fname" android:layout_width="fill_parent" android:layout_weight="1" android:layout_marginLeft="4dp"></TextView>
<TextView android:gravity="center_vertical" android:layout_height="fill_parent" android:text="Full path" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="#000000" android:background="@color/normal_transparent" android:id="@+id/res_dname" android:layout_width="fill_parent" android:layout_weight="1" android:layout_marginLeft="4dp"></TextView>
<TextView android:gravity="center_vertical" android:layout_height="wrap_content" android:text="Filename" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/normal_fg" android:background="@color/normal_transparent" android:id="@+id/res_fname" android:layout_width="fill_parent" android:layout_weight="1" android:layout_marginLeft="4dp" android:layout_gravity="top|left"></TextView>
<TextView android:gravity="center_vertical" android:layout_height="wrap_content" android:text="Full path" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="#000000" android:background="@color/normal_transparent" android:id="@+id/res_dname" android:layout_width="fill_parent" android:layout_weight="1" android:layout_marginLeft="4dp" android:layout_gravity="top|left"></TextView>
</LinearLayout>

</LinearLayout>
8 changes: 4 additions & 4 deletions res/layout/taskmanager_item.xml
Expand Up @@ -4,10 +4,10 @@
android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/normal_bg" android:paddingBottom="2dp" android:paddingTop="2dp">

<ImageView android:src="@drawable/dir_ok" android:background="@color/normal_bg" android:layout_width="48dp" android:id="@+id/tm_icon" android:layout_height="48dp" android:layout_gravity="center" android:focusable="false" android:clickable="false" android:layout_marginLeft="4dp" android:layout_marginTop="2dp" android:layout_marginRight="2dp" android:layout_marginBottom="2dp"></ImageView>
<ImageView android:src="@drawable/dir_ok" android:background="@color/normal_bg" android:layout_width="48dp" android:id="@+id/tm_icon" android:layout_height="48dp" android:layout_gravity="top|left" android:focusable="false" android:clickable="false" android:layout_marginLeft="4dp" android:layout_marginTop="2dp" android:layout_marginRight="2dp" android:layout_marginBottom="2dp"></ImageView>
<LinearLayout android:id="@+id/linearLayout1" android:background="@color/normal_bg" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="4dp">
<EditText android:gravity="center_vertical" android:text="Filename" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#000000" android:background="#ffffff" android:layout_width="fill_parent" android:id="@+id/tm_label" android:inputType="textMultiLine" android:focusable="false" android:editable="false" android:layout_height="fill_parent" android:layout_weight="1" android:clickable="false"></EditText>
<EditText android:gravity="center_vertical" android:text="Full path" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="#000000" android:background="#ffffff" android:layout_width="fill_parent" android:id="@+id/tm_fullname" android:inputType="textMultiLine" android:focusable="false" android:editable="false" android:layout_height="fill_parent" android:layout_weight="1" android:clickable="false"></EditText>
<EditText android:gravity="center_vertical" android:text="Full path" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:background="#ffffff" android:layout_width="fill_parent" android:id="@+id/tm_extra" android:inputType="textMultiLine" android:focusable="false" android:editable="false" android:layout_height="fill_parent" android:layout_weight="1" android:clickable="false"></EditText>
<EditText android:gravity="center_vertical" android:text="Filename" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#000000" android:background="@color/normal_bg" android:layout_width="fill_parent" android:id="@+id/tm_label" android:inputType="textMultiLine" android:focusable="false" android:editable="false" android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false" android:layout_gravity="top|left"></EditText>
<EditText android:gravity="center_vertical" android:text="Full path" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="#000000" android:background="#ffffff" android:layout_width="fill_parent" android:id="@+id/tm_fullname" android:inputType="textMultiLine" android:focusable="false" android:editable="false" android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false" android:layout_gravity="top|left"></EditText>
<EditText android:gravity="center_vertical" android:text="Full path" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:background="#ffffff" android:layout_width="fill_parent" android:id="@+id/tm_extra" android:inputType="textMultiLine" android:focusable="false" android:editable="false" android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false" android:layout_gravity="top|left"></EditText>
</LinearLayout>
</LinearLayout>
8 changes: 5 additions & 3 deletions src/com/harasoft/relaunch/SView.java
Expand Up @@ -68,8 +68,9 @@ protected void onDraw(Canvas canvas) {
//int w = getWidth() - lpad;
float w = getMeasuredWidth() - 1;
float clpad = w * lpad / scrollW;
//Log.d(TAG, "SV -- first:" + first + " count:" + count + " total:" + total + " (" + w + " x " + h + ")");
if (total == 0)
// Log.d(TAG, "SV -- first:" + first + " count:" + count + " total:" + total + " (" + w + " x " + h + ")");
if (total == 0) // for phones with smooth scroll? may be make choice
//if (total == 0 || (first==0 && total<=count))
canvas.drawRect(clpad, 0, w, h, freePaint);
else
{
Expand All @@ -86,9 +87,10 @@ protected void onDraw(Canvas canvas) {
canvas.drawRect(clpad, curr, w, h, busyPaint);
curr += n;
}
if ((first + count) < (total - 1))
if ((first + count) < total)
canvas.drawRect(clpad, curr, w, h, freePaint);
}
// may be here fully go away (make choice) ?
canvas.drawLine(clpad,0, w,0,outlinePaint);
canvas.drawLine(w,0,w,h,outlinePaint);
canvas.drawLine(w,h,clpad,h,outlinePaint);
Expand Down

0 comments on commit f62d5ff

Please sign in to comment.