2727import android .net .Uri ;
2828import android .os .Build ;
2929import android .os .Bundle ;
30- import android .support .v7 .app .ActionBarActivity ;
30+ import android .support .v7 .app .AppCompatActivity ;
3131import android .support .v7 .view .ActionMode ;
3232import android .text .Html ;
3333import android .view .Gravity ;
5555import org .csploit .android .core .MultiAttackService ;
5656import org .csploit .android .core .Plugin ;
5757import org .csploit .android .core .System ;
58- import org .csploit .android .services .UpdateChecker ;
59- import org .csploit .android .services .UpdateService ;
6058import org .csploit .android .events .Event ;
6159import org .csploit .android .gui .dialogs .AboutDialog ;
6260import org .csploit .android .gui .dialogs .ConfirmDialog ;
6967import org .csploit .android .gui .dialogs .SpinnerDialog ;
7068import org .csploit .android .gui .dialogs .SpinnerDialog .SpinnerDialogListener ;
7169import org .csploit .android .net .Network ;
72- import org .csploit .android .services .NetworkRadar ;
7370import org .csploit .android .net .Target ;
7471import org .csploit .android .plugins .ExploitFinder ;
7572import org .csploit .android .plugins .Inspector ;
8178import org .csploit .android .plugins .Traceroute ;
8279import org .csploit .android .plugins .mitm .MITM ;
8380import org .csploit .android .services .MsfRpcdService ;
81+ import org .csploit .android .services .NetworkRadar ;
82+ import org .csploit .android .services .UpdateChecker ;
83+ import org .csploit .android .services .UpdateService ;
8484import org .csploit .android .services .receivers .MsfRpcdServiceReceiver ;
8585import org .csploit .android .services .receivers .NetworkRadarReceiver ;
8686import org .csploit .android .update .CoreUpdate ;
9797import static org .csploit .android .services .UpdateChecker .UPDATE_NOT_AVAILABLE ;
9898
9999@ SuppressLint ("NewApi" )
100- public class MainActivity extends ActionBarActivity {
100+ public class MainActivity extends AppCompatActivity {
101101 private String UPDATE_MESSAGE ;
102102 private static final int WIFI_CONNECTION_REQUEST = 1012 ;
103103 private boolean isWifiAvailable = false ;
@@ -290,7 +290,6 @@ public void run() {
290290
291291 @ Override
292292 public void onCreate (Bundle savedInstanceState ) {
293- super .onCreate (savedInstanceState );
294293 SharedPreferences themePrefs = getSharedPreferences ("THEME" , 0 );
295294 Boolean isDark = themePrefs .getBoolean ("isDark" , false );
296295 boolean connectivityAvailable ;
@@ -299,7 +298,7 @@ public void onCreate(Bundle savedInstanceState) {
299298 setTheme (R .style .DarkTheme );
300299 else
301300 setTheme (R .style .AppTheme );
302-
301+ super . onCreate ( savedInstanceState );
303302 setContentView (R .layout .target_layout );
304303
305304 lv = (ListView ) findViewById (R .id .android_list );
@@ -831,7 +830,8 @@ public View getView(int position, View convertView, ViewGroup parent) {
831830 .getSystemService (Context .LAYOUT_INFLATER_SERVICE );
832831 row = inflater
833832 .inflate (R .layout .target_list_item , parent , false );
834-
833+ if (getSharedPreferences ("THEME" , 0 ).getBoolean ("isDark" , false ))
834+ row .setBackground (getResources ().getDrawable (R .drawable .card_background_dark ));
835835 holder = new TargetHolder ();
836836 holder .itemImage = (ImageView ) (row != null ? row
837837 .findViewById (R .id .itemIcon ) : null );
@@ -857,8 +857,8 @@ public View getView(int position, View convertView, ViewGroup parent) {
857857
858858 holder .itemTitle .setTextColor (getResources ().getColor ((target .isConnected () ? R .color .app_color : R .color .gray_text )));
859859
860- if (row != null )
861- row .setBackgroundColor (getResources ().getColor (( target . isSelected () ? R . color . background_material_dark : android . R . color . transparent ) ));
860+ if (row != null && ( getSharedPreferences ( "THEME" , 0 ). getBoolean ( "isDark" , false )) )
861+ row .setBackground (getResources ().getDrawable ( R . drawable . card_background_dark ));
862862
863863 holder .itemTitle .setTypeface (null , Typeface .NORMAL );
864864 holder .itemImage .setImageResource (target .getDrawableResourceId ());
0 commit comments