Skip to content

Commit

Permalink
Improved UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciotogneri committed Sep 11, 2016
1 parent 90c4f7b commit 5d88e17
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties
gradle.properties

# Android Studio
/.idea
**/*.iml
/captures

# OSX files
.DS_Store

# Ignore gradle files
.gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.util.TypedValue;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
Expand Down Expand Up @@ -86,6 +87,15 @@ else if (fileInfo.isVideo())
{
viewHolder.extension.setText(extension);
viewHolder.extension.setBackgroundResource(R.drawable.extension_border);

if (extension.length() <= 3)
{
viewHolder.extension.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
}
else
{
viewHolder.extension.setTextSize(TypedValue.COMPLEX_UNIT_SP, 8);
}
}
else
{
Expand All @@ -97,7 +107,7 @@ else if (fileInfo.isVideo())

if (fileInfo.isSelected())
{
rowView.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.gray5));
rowView.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.gray4));
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

public class FolderFragment extends Fragment
{
private static final String PARAMETER_FOLDER_PATH = "folder_path";
private static final String PARAMETER_FOLDER_PATH = "folder.path";

private MainActivity mainActivity;
private ListView listView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public String extension()
{
String extension = name.substring(index + 1);

if (extension.length() <= 3)
if (extension.length() <= 4)
{
cachedExtension = extension.toUpperCase();
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/extension_border.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

<stroke
android:width="2px"
android:color="@color/gray3"/>
android:color="@color/gray2"/>

</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/row_file.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
style="@style/defaultText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/gray3"
android:textColor="@color/gray2"
android:textSize="14sp"
tools:text="@string/dummy_text"/>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/screen_folder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:divider="@color/gray4"
android:divider="@color/gray3"
android:dividerHeight="0.2dp"/>

<TextView
Expand Down
7 changes: 3 additions & 4 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
<resources>

<color name="gray1">#666666</color>
<color name="gray2">#888888</color>
<color name="gray3">#AAAAAA</color>
<color name="gray4">#CCCCCC</color>
<color name="gray5">#DDDDDD</color>
<color name="gray2">#AAAAAA</color>
<color name="gray3">#CCCCCC</color>
<color name="gray4">#DDDDDD</color>

<color name="blue1">#0075A8</color>
<color name="blue2">#0081BA</color>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<style name="dialog" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/blue2</item>
<item name="android:textColorPrimary">@color/gray2</item>
<item name="android:textColorPrimary">@color/gray1</item>
<item name="android:background">@color/white</item>
</style>

Expand Down

0 comments on commit 5d88e17

Please sign in to comment.