diff options
Diffstat (limited to 'app')
16 files changed, 183 insertions, 73 deletions
diff --git a/app/src/main/java/layout/FragmentBoardItemList.java b/app/src/main/java/layout/FragmentBoardItemList.java index 38e4819..149def3 100644 --- a/app/src/main/java/layout/FragmentBoardItemList.java +++ b/app/src/main/java/layout/FragmentBoardItemList.java @@ -38,6 +38,7 @@ import org.bienvenidoainternet.baiparser.MainActivity; import org.bienvenidoainternet.baiparser.R; import org.bienvenidoainternet.baiparser.RecentPostAdapter; import org.bienvenidoainternet.baiparser.ResponseActivity; +import org.bienvenidoainternet.baiparser.ThemeManager; import org.bienvenidoainternet.baiparser.ThreadListAdapter; import org.bienvenidoainternet.baiparser.structure.Board; import org.bienvenidoainternet.baiparser.structure.BoardItem; @@ -80,6 +81,8 @@ public class FragmentBoardItemList extends Fragment { LinearLayout layoutThreadProcess; TextView txtThreadProcess; + ThemeManager tm; + public FragmentBoardItemList() { // Required empty public constructor @@ -104,6 +107,7 @@ public class FragmentBoardItemList extends Fragment { this.currentThread = getArguments().getParcelable(ARG_CURRENT_THREAD); this.imMainFragment = getArguments().getBoolean(ARG_MAIN_FRAGMENT); } + tm = new ThemeManager(getActivity()); } @Override @@ -130,7 +134,7 @@ public class FragmentBoardItemList extends Fragment { // Aplicación del Tema settings = PreferenceManager.getDefaultSharedPreferences(this.getContext()); - int themeResId = ((MainActivity)getActivity()).getCurrentThemeId(); + int themeResId = tm.getCurrentThemeId(); Context context = new ContextThemeWrapper(getActivity(), themeResId); LayoutInflater localInflater = inflater.cloneInContext(context); View v = localInflater.inflate(R.layout.fragment_fragment_thread_list, container, false); @@ -145,14 +149,14 @@ public class FragmentBoardItemList extends Fragment { this.loadingBar = (ProgressBar)rootView.findViewById(R.id.progressBar); // Agregamos color al divider del listview - ColorDrawable cd = new ColorDrawable((((MainActivity) getActivity()).themeManager).getMarginColor()); + ColorDrawable cd = new ColorDrawable(tm.getMarginColor()); listViewBoardItems.setDivider(cd); listViewBoardItems.setDividerHeight(1); // registramos los menus del listview registerForContextMenu(listViewBoardItems); // Creamos los dos adaptadores y los seteamos dependiendo del modo del fragmento - listViewAdapter = new ThreadListAdapter(v.getContext(), boardItems, (((MainActivity) getActivity()).themeManager)); + listViewAdapter = new ThreadListAdapter(v.getContext(), boardItems, tm); recentPostAdapter = new RecentPostAdapter(v.getContext(), boardItems); if (recentPostMode){ listViewBoardItems.setAdapter(recentPostAdapter); diff --git a/app/src/main/java/layout/FragmentImage.java b/app/src/main/java/layout/FragmentImage.java index 399e9f3..f337e5f 100644 --- a/app/src/main/java/layout/FragmentImage.java +++ b/app/src/main/java/layout/FragmentImage.java @@ -2,6 +2,7 @@ package layout; import android.content.Context; import android.content.ContextWrapper; +import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; @@ -9,8 +10,9 @@ import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.Button; import android.widget.ProgressBar; -import android.widget.TextView; +import android.widget.RelativeLayout; import com.davemorrissey.labs.subscaleview.ImageSource; import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView; @@ -19,7 +21,6 @@ import com.koushikdutta.ion.Ion; import org.bienvenidoainternet.baiparser.R; import org.bienvenidoainternet.baiparser.ViewerActivity; -import org.bienvenidoainternet.baiparser.structure.BoardItem; import org.bienvenidoainternet.baiparser.structure.BoardItemFile; import java.io.File; @@ -80,11 +81,24 @@ public class FragmentImage extends Fragment { gifView = (GifImageView) view.findViewById(R.id.gifView); imageView.setVisibility(View.GONE); gifView.setVisibility(View.GONE); + RelativeLayout layoutOpenBrowser = (RelativeLayout) view.findViewById(R.id.layoutOpenBrowser); if (boardItemFile.file != null) { if (!boardItemFile.file.endsWith(".webm") && !boardItemFile.file.endsWith(".swf")) { + layoutOpenBrowser.setVisibility(View.GONE); downloadFile(); + }else{ + layoutOpenBrowser.setVisibility(View.VISIBLE); } } + Button btnOpenBrowser = (Button) view.findViewById(R.id.btnLaunchBrowser); + btnOpenBrowser.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse(boardItemFile.fileURL)); + in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + v.getContext().startActivity(in); + } + }); return view; } diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/LicensesActivity.java b/app/src/main/java/org/bienvenidoainternet/baiparser/LicensesActivity.java index b91ce2b..575754a 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/LicensesActivity.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/LicensesActivity.java @@ -1,7 +1,7 @@ package org.bienvenidoainternet.baiparser; -import android.support.v7.app.AppCompatActivity; import android.os.Bundle; +import android.support.v7.app.AppCompatActivity; import android.webkit.WebView; public class LicensesActivity extends AppCompatActivity { @@ -9,7 +9,10 @@ public class LicensesActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + ThemeManager tm = new ThemeManager(this); + this.setTheme(tm.getThemeForActivity()); setContentView(R.layout.activity_licenses); + getSupportActionBar().setTitle("Acerca de BaI App"); WebView webView = (WebView) findViewById(R.id.webView); webView.loadUrl("file:///android_asset/html/licenses.html"); } diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java b/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java index 9130160..18d2e08 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/MainActivity.java @@ -31,6 +31,7 @@ import com.koushikdutta.ion.Ion; import org.bienvenidoainternet.baiparser.structure.Board; import org.bienvenidoainternet.baiparser.structure.BoardItem; +import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -78,46 +79,25 @@ public class MainActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + ThemeManager tm = new ThemeManager(this); + this.setTheme(tm.getThemeForMainActivity()); if (savedInstanceState != null) { currentThemeId = savedInstanceState.getInt("currentThemeId"); boardList = savedInstanceState.getParcelableArrayList("boardList"); } SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this); - themeId = Integer.valueOf(settings.getString("pref_theme", "1")); - if (settings.getString("pref_password", "").isEmpty()){ SharedPreferences.Editor edit = settings.edit(); edit.putString("pref_password", makePassword()); edit.commit(); } - switch (themeId) { - case 1: - currentThemeId = R.style.AppTheme_NoActionBar; - break; - case 2: - currentThemeId = R.style.AppTheme_Dark; - break; - case 3: - currentThemeId = R.style.AppTheme_HeadLine; - setTheme(R.style.AppTheme_HeadLine_Activity); - break; - case 4: - currentThemeId = R.style.AppTheme_Black; - setTheme(R.style.AppTheme_Black_Activity); - break; - } - - themeManager = new ThemeManager(this); - Log.d("ThemeManager", "isDarkTheme: " + themeManager.isDarkTheme()); - setContentView(R.layout.activity_main); toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setTitle("Bievenido a internet"); this.setSupportActionBar(toolbar); - fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override @@ -372,25 +352,25 @@ public class MainActivity extends AppCompatActivity final SubMenu sub = menu.addSubMenu("Lista de Boards"); Ion.with(getApplicationContext()) .load("http://bienvenidoainternet.org/cgi/api/boards") - .asJsonObject() - .setCallback(new FutureCallback<JsonObject>() { + .asString() + .setCallback(new FutureCallback<String>() { @Override - public void onCompleted(Exception e, JsonObject result) { + public void onCompleted(Exception e, String result) { if (e != null) { e.printStackTrace(); Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show(); - } else { - JsonArray boards = result.get("boards").getAsJsonArray(); - for (int i = 0; i < boards.size(); i++) { - try { - JSONObject board = new JSONObject(boards.get(i).toString()); + }else { + try { + JSONArray boards = new JSONObject(result).getJSONArray("boards"); + for (int i = 0; i < boards.length(); i++) { + JSONObject board = boards.getJSONObject(i); Board parsedBoard = new Board(board.getString("name"), board.getString("dir"), board.getInt("board_type")); sub.add(parsedBoard.getBoardName()); boardList.add(parsedBoard); - } catch (JSONException e1) { - e1.printStackTrace(); - Toast.makeText(getApplicationContext(), "Error parsing JSON", Toast.LENGTH_LONG).show(); } + }catch (JSONException e1) { + Toast.makeText(getApplicationContext(), e1.getMessage(), Toast.LENGTH_LONG).show(); + e1.printStackTrace(); } } } diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/ResponseActivity.java b/app/src/main/java/org/bienvenidoainternet/baiparser/ResponseActivity.java index e96868a..350de99 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/ResponseActivity.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/ResponseActivity.java @@ -2,12 +2,10 @@ package org.bienvenidoainternet.baiparser; import android.content.Intent; import android.content.SharedPreferences; -import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; @@ -45,10 +43,12 @@ public class ResponseActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + ThemeManager tm = new ThemeManager(this); + this.setTheme(tm.getThemeForActivity()); setContentView(R.layout.activity_response); + getSupportActionBar().setTitle("Respondiendo"); settings = PreferenceManager.getDefaultSharedPreferences(this); password = settings.getString("pref_password", "12345678"); - Log.v("password", password); if (savedInstanceState != null){ this.theReply = savedInstanceState.getParcelable("theReply"); diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/SettingsActivity.java b/app/src/main/java/org/bienvenidoainternet/baiparser/SettingsActivity.java index e8e7df4..eefc5fb 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/SettingsActivity.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/SettingsActivity.java @@ -95,6 +95,8 @@ public class SettingsActivity extends AppCompatPreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + ThemeManager tm = new ThemeManager(this); + this.setTheme(tm.getThemeForActivity()); setupActionBar(); getFragmentManager().beginTransaction().replace(android.R.id.content, new GeneralPreferenceFragment()).commit(); } diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/ThemeManager.java b/app/src/main/java/org/bienvenidoainternet/baiparser/ThemeManager.java index 7f0be86..28c0d74 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/ThemeManager.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/ThemeManager.java @@ -1,26 +1,54 @@ package org.bienvenidoainternet.baiparser; +import android.app.Activity; +import android.content.SharedPreferences; import android.content.res.TypedArray; import android.graphics.Color; +import android.preference.PreferenceManager; +import android.util.Log; /** * Created by Renard on 16-03-2016. */ public class ThemeManager { - private MainActivity ac; private int currentThemeId; - public ThemeManager(MainActivity ac){ - this.ac = ac; - this.currentThemeId = ac.getCurrentThemeId(); + private int prefThemeId; + private Activity activity; + public ThemeManager(Activity activity){ + this.activity = activity; + setCurrentThemeId(); + } + + public void setCurrentThemeId(){ + SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(activity); + int themeId = Integer.valueOf(settings.getString("pref_theme", "1")); + prefThemeId = themeId; + switch (themeId) { + case 1: + currentThemeId = R.style.AppTheme_NoActionBar; + break; + case 2: + currentThemeId = R.style.AppTheme_Dark; + break; + case 3: + currentThemeId = R.style.AppTheme_HeadLine; +// setTheme(R.style.AppTheme_HeadLine_Activity); + break; + case 4: + currentThemeId = R.style.AppTheme_Black; +// setTheme(R.style.AppTheme_Black_Activity); + break; + } + Log.d("ThemeManager", "isDarkTheme: " + isDarkTheme()); } public int getSageColor(){ - TypedArray a = ac.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.sageColor}); + TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.sageColor}); return a.getColor(0, Color.CYAN); } public int getMarginColor(){ - TypedArray a = ac.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.marginColor}); + TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.marginColor}); return a.getColor(0, Color.CYAN); } @@ -29,27 +57,69 @@ public class ThemeManager { } public int getNameColor() { - TypedArray a = ac.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.nameColor}); + TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.nameColor}); return a.getColor(0, Color.CYAN); } public int getTripcodeColor() { - TypedArray a = ac.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.tripcodeColor}); + TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.tripcodeColor}); return a.getColor(0, Color.CYAN); } public int getPrimaryColor(){ - TypedArray a = ac.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.colorPrimary}); + TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.colorPrimary}); return a.getColor(0, Color.CYAN); } public int getPrimaryDarkColor(){ - TypedArray a = ac.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.colorPrimaryDark}); + TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.colorPrimaryDark}); return a.getColor(0, Color.CYAN); } public boolean isDarkTheme(){ - TypedArray a = ac.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.isDarkTheme}); + TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.isDarkTheme}); return a.getBoolean(0, false); } + public int getThemeForActivity(){ + int id = R.style.AppTheme; + switch (prefThemeId) { + case 1: // pseudoch + id = R.style.AppTheme; + break; + case 2: // nightmode + id = R.style.AppTheme; + break; + case 3: // photon + id = R.style.AppTheme_HeadLineActionBar; + break; + case 4: // tomorrow + id = R.style.AppTheme_BlackActionBar; + break; + } + return id; + } + + public int getThemeForMainActivity(){ + int id = R.style.AppTheme_NoActionBar; + switch (prefThemeId) { + case 1: // pseudoch + id = R.style.AppTheme_NoActionBar; + break; + case 2: // nightmode + id = R.style.AppTheme_NoActionBar; + break; + case 3: // photon + id = R.style.AppTheme_HeadLineActionBar_NoActionBar; + break; + case 4: // tomorrow + id = R.style.AppTheme_BlackActionBar_NoActionBar; + break; + } + return id; + } + + + public int getCurrentThemeId() { + return currentThemeId; + } } diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/ThreadListAdapter.java b/app/src/main/java/org/bienvenidoainternet/baiparser/ThreadListAdapter.java index 85cd891..7a85c1f 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/ThreadListAdapter.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/ThreadListAdapter.java @@ -228,8 +228,15 @@ public class ThreadListAdapter extends ArrayAdapter<BoardItem>{ txtReplies.setVisibility(boardItem.isReply ? View.GONE : View.VISIBLE); txtReplies.setText(boardItem.getTotalReplies() + " respuestas " + (boardItem.getTotalFiles() == 0 ? "" : ", " + boardItem.getTotalFiles() + " archivos")); + String fileExt = ""; + if (!boardItem.getFile().isEmpty()){ + String[] pathSplit = boardItem.getFile().split("\\."); + if (pathSplit.length != 0){ + fileExt = pathSplit[1].toUpperCase(); + } + } txtFileInfo.setVisibility(boardItem.getThumb().isEmpty() ? View.GONE : View.VISIBLE); - txtFileInfo.setText((boardItem.getFileSize() / 1024) + " KB " + boardItem.getThumbHeight() + "x" + boardItem.getThumbWidth()); + txtFileInfo.setText(fileExt + " " + (boardItem.getFileSize() / 1024) + " KB " + boardItem.getThumbHeight() + "x" + boardItem.getThumbWidth()); // Trasnparentar items con sage if (convertView != null){ diff --git a/app/src/main/java/org/bienvenidoainternet/baiparser/ViewerActivity.java b/app/src/main/java/org/bienvenidoainternet/baiparser/ViewerActivity.java index 9d140ec..8dc1262 100644 --- a/app/src/main/java/org/bienvenidoainternet/baiparser/ViewerActivity.java +++ b/app/src/main/java/org/bienvenidoainternet/baiparser/ViewerActivity.java @@ -14,9 +14,6 @@ import android.view.MenuItem; import android.widget.ProgressBar; import android.widget.Toast; -import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView; - -import org.bienvenidoainternet.baiparser.structure.BoardItem; import org.bienvenidoainternet.baiparser.structure.BoardItemFile; import java.io.File; @@ -27,7 +24,6 @@ import java.io.OutputStream; import java.util.ArrayList; import layout.FragmentImage; -import pl.droidsonroids.gif.GifImageView; public class ViewerActivity extends AppCompatActivity implements FragmentImage.OnFragmentInteractionListener { private static final String EXTRA_FILELIST = "fileList", EXTRA_RELATIVEPOSITION = "position"; @@ -54,7 +50,6 @@ public class ViewerActivity extends AppCompatActivity implements FragmentImage.O pagerAdapter.addFragment(FragmentImage.newInstance(fileList.get(i))); } imagePager.setAdapter(pagerAdapter); - imagePager.setCurrentItem(relativePosition); imagePager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { @@ -63,7 +58,7 @@ public class ViewerActivity extends AppCompatActivity implements FragmentImage.O @Override public void onPageSelected(int position) { - getSupportActionBar().setSubtitle(fileList.get(position).file); + getSupportActionBar().setSubtitle("(" + (position + 1) + " / " + fileList.size() + ") " + fileList.get(position).file); } @Override @@ -71,6 +66,7 @@ public class ViewerActivity extends AppCompatActivity implements FragmentImage.O } }); + imagePager.setCurrentItem(relativePosition); this.getSupportActionBar().setDisplayHomeAsUpEnabled(true); } diff --git a/app/src/main/res/layout/activity_response.xml b/app/src/main/res/layout/activity_response.xml index bfd143e..15d35eb 100644 --- a/app/src/main/res/layout/activity_response.xml +++ b/app/src/main/res/layout/activity_response.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" - xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" diff --git a/app/src/main/res/layout/fragment_fragment_image.xml b/app/src/main/res/layout/fragment_fragment_image.xml index 093508a..5d44190 100644 --- a/app/src/main/res/layout/fragment_fragment_image.xml +++ b/app/src/main/res/layout/fragment_fragment_image.xml @@ -1,8 +1,34 @@ -<FrameLayout 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" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context="layout.FragmentImage"> + tools:context="layout.FragmentImage" + android:orientation="vertical"> + + <RelativeLayout + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/layoutOpenBrowser"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="No se puede visualizar este archivo." + android:layout_centerVertical="true" + android:layout_centerHorizontal="true" + android:id="@+id/textView2" + android:textColor="#ff0000" /> + + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Abrir en el navegador" + android:id="@+id/btnLaunchBrowser" + android:layout_below="@+id/textView2" + android:layout_centerHorizontal="true" /> + </RelativeLayout> <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView android:id="@+id/imageView" @@ -12,4 +38,5 @@ android:id="@+id/gifView" android:layout_width="match_parent" android:layout_height="match_parent"/> -</FrameLayout> + +</LinearLayout> diff --git a/app/src/main/res/layout/fragment_fragment_thread_list.xml b/app/src/main/res/layout/fragment_fragment_thread_list.xml index af88df4..477c236 100644 --- a/app/src/main/res/layout/fragment_fragment_thread_list.xml +++ b/app/src/main/res/layout/fragment_fragment_thread_list.xml @@ -1,5 +1,4 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentTop="true" diff --git a/app/src/main/res/menu/menu_viewer.xml b/app/src/main/res/menu/menu_viewer.xml index 31069eb..bb4352b 100644 --- a/app/src/main/res/menu/menu_viewer.xml +++ b/app/src/main/res/menu/menu_viewer.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<menu xmlns:tools="http://schemas.android.com/tools" - xmlns:android="http://schemas.android.com/apk/res/android" +<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:title="Guardar" android:id="@+id/menu_save_img" diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 5806545..8274b32 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -14,8 +14,8 @@ <color name="nightMarginColor">#58636c</color> <!-- 3 58636c--> <color name="nightTextColor">#979ea3</color> <!-- 6 --> <color name="nightLinkColor">#c0c4c8</color> <!-- 8 --> - <color name="nightNameColor">#2e5f96</color> - <color name="nightSageColor">#5f962e</color> + <color name="nightNameColor">#5f962e</color> + <color name="nightSageColor">#2e5f96</color> <color name="nightTripcodeColor">#962e5f</color> <color name="headlineBackground">#DDDDDD</color> <!-- 1 --> diff --git a/app/src/main/res/values/drawables.xml b/app/src/main/res/values/drawables.xml index 52c6a6c..9036d27 100644 --- a/app/src/main/res/values/drawables.xml +++ b/app/src/main/res/values/drawables.xml @@ -1,4 +1,4 @@ -<resources xmlns:android="http://schemas.android.com/apk/res/android"> +<resources> <item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item> <item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item> <item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 5cadb6e..4d0766f 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -31,7 +31,12 @@ <item name="isDarkTheme">true</item> </style> - <style name="AppTheme.HeadLine.Activity" parent="AppTheme.NoActionBar"> + <style name="AppTheme.HeadLineActionBar.NoActionBar" parent="AppTheme.HeadLineActionBar"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + </style> + + <style name="AppTheme.HeadLineActionBar"> <item name="colorPrimary">@color/headlineTextColor</item> <item name="colorPrimaryDark">@color/blackBackground</item> <item name="colorAccent">@color/headlineLinkColor</item> @@ -53,7 +58,12 @@ <item name="isDarkTheme">false</item> </style> - <style name="AppTheme.Black.Activity" parent="AppTheme.NoActionBar"> + <style name="AppTheme.BlackActionBar.NoActionBar" parent="AppTheme.BlackActionBar"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + </style> + + <style name="AppTheme.BlackActionBar"> <item name="colorPrimary">@color/blackBackground</item> <item name="colorPrimaryDark">@color/blackMarginColor</item> <item name="colorAccent">@color/blackMarginColor</item> |