Skip to content

Commit 44f31d6

Browse files
committed
fix textpassword color
1 parent b5d9b24 commit 44f31d6

8 files changed

Lines changed: 38 additions & 15 deletions

File tree

PowerFileExplorer/src/main/java/net/gnu/explorer/ExplorerActivity.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
import net.gnu.common.*;
135135
import android.support.v4.content.FileProvider;
136136
import android.content.*;
137+
import android.widget.*;
137138

138139

139140
public class ExplorerActivity extends StorageCheckActivity implements OnRequestPermissionsResultCallback,
@@ -514,9 +515,9 @@ public void onCreate(final Bundle savedInstanceState) {
514515
} else {
515516
//actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
516517
//actionBar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
517-
actionBar.setDisplayShowTitleEnabled(true);
518-
actionBar.setDisplayHomeAsUpEnabled(true);
519-
//actionBar.setHomeButtonEnabled(true);
518+
// actionBar.setDisplayShowTitleEnabled(true);
519+
// actionBar.setDisplayHomeAsUpEnabled(true);
520+
// actionBar.setHomeButtonEnabled(true);
520521
final View customView = getLayoutInflater().inflate(R.layout.filechoosertoolbar, null);
521522
actionBar.setCustomView(customView);
522523
actionBar.setDisplayShowCustomEnabled(true);
@@ -528,10 +529,11 @@ public void onCreate(final Bundle savedInstanceState) {
528529
density = (int)(resources.getDisplayMetrics().density);
529530

530531
final String extraTitle = intent.getStringExtra(Constants.EXTRA_TITLE);
531-
if (intent.hasExtra(Constants.EXTRA_TITLE)) {
532-
setTitle(extraTitle);
533-
} else {
534-
setTitle(R.string.pick_title);
532+
if (extraTitle != null) {//}intent.hasExtra(Constants.EXTRA_TITLE)) {
533+
//setTitle(extraTitle);
534+
((TextView)actionBar.getCustomView().findViewById(R.id.title)).setText(extraTitle);
535+
// } else {
536+
// setTitle(R.string.pick_title);
535537
}
536538

537539
suffix = intent.getStringExtra(Constants.EXTRA_FILTER_FILETYPE);

PowerFileExplorer/src/main/java/net/gnu/p7zip/ShowHidePasswordEditText.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import android.view.View;
1818
import android.widget.EditText;
1919
import net.gnu.explorer.R;
20+
import android.graphics.*;
2021

2122
/**
2223
* Custom version of EditText that shows and hides password onClick of the visibility icon
@@ -137,6 +138,11 @@ public void setCompoundDrawables(Drawable left, Drawable top,
137138

138139
public void setTintColor( int tintColor) {
139140
this.tintColor = tintColor;
141+
final Drawable[] existingDrawables = getCompoundDrawables();
142+
if (existingDrawables[0] != null)
143+
existingDrawables[0].setColorFilter(tintColor, PorterDuff.Mode.SRC_IN);
144+
if (existingDrawables[2] != null)
145+
existingDrawables[2].setColorFilter(tintColor, PorterDuff.Mode.SRC_IN);
140146
}
141147

142148
@Override

PowerFileExplorer/src/main/res/layout/filechoosertoolbar.xml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout
2+
<RelativeLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:id="@+id/buttons"
55
android:layout_width="wrap_content"
@@ -8,7 +8,22 @@
88
android:gravity="right"
99
android:orientation="horizontal"
1010
android:layout_margin="0dp" >
11-
11+
12+
<TextView
13+
android:id="@+id/title"
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:layout_alignParentLeft="true"
17+
android:layout_toLeftOf="@+id/cancelDir"
18+
android:text="@string/pick_title"
19+
android:singleLine="true"
20+
android:ellipsize="middle"
21+
android:gravity="left|center_vertical"
22+
android:layout_gravity="left|center_vertical"
23+
android:layout_centerVertical="true"
24+
android:textSize="24sp"
25+
android:textAppearance="?android:textAppearanceLarge"
26+
/>
1227
<ImageButton
1328
android:id="@+id/cancelDir"
1429
android:layout_width="64dp"
@@ -32,5 +47,5 @@
3247
android:src="@drawable/install"
3348
android:textSize="14sp"
3449
android:layout_margin="0dp" />
35-
</LinearLayout>
50+
</RelativeLayout>
3651

PowerFileExplorer/src/main/res/layout/list_item.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
android:layout_gravity="center_vertical"
7878
android:layout_centerVertical="true"
7979
android:paddingLeft="10dp"
80-
android:paddingRight="10dp"
80+
android:paddingRight="7dp"
8181
android:background="@drawable/ripple"
8282
android:src="@drawable/ic_more_vert_black_48dp"/>
8383

PowerFileExplorer/src/main/res/layout/list_item_app.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
android:background="@drawable/ripple"
6666
android:layout_gravity="center_vertical"
6767
android:paddingLeft="15dp"
68-
android:paddingRight="15dp"
68+
android:paddingRight="7dp"
6969
android:src="@drawable/ic_more_vert_black_48dp"/>
7070

7171

PowerFileExplorer/src/main/res/layout/list_item_net.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
android:background="@drawable/ripple"
7474
android:layout_gravity="center_vertical"
7575
android:paddingLeft="15dp"
76-
android:paddingRight="15dp"
76+
android:paddingRight="7dp"
7777
android:src="@drawable/ic_more_vert_black_48dp"/>
7878

7979
<!--TextView

PowerFileExplorer/src/main/res/layout/list_item_process.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
android:background="@drawable/ripple"
7272
android:layout_gravity="center_vertical"
7373
android:paddingLeft="15dp"
74-
android:paddingRight="15dp"
74+
android:paddingRight="7dp"
7575
android:src="@drawable/ic_more_vert_black_48dp"/>
7676

7777
<!--TextView

PowerFileExplorer/src/main/res/layout/list_item_small.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
android:layout_gravity="center_vertical"
7878
android:layout_centerVertical="true"
7979
android:paddingLeft="10dp"
80-
android:paddingRight="10dp"
80+
android:paddingRight="7dp"
8181
android:background="@drawable/ripple"
8282
android:src="@drawable/ic_more_vert_black_48dp"/>
8383

0 commit comments

Comments
 (0)