Start of Material redesign.

material
Floens 11 years ago
parent 0b5d885dff
commit 75a695de96
  1. 3
      Clover/app/build.gradle
  2. 2
      Clover/app/src/main/AndroidManifest.xml
  3. 37
      Clover/app/src/main/java/org/floens/chan/ui/ThemeActivity.java
  4. 32
      Clover/app/src/main/java/org/floens/chan/ui/activity/BaseActivity.java
  5. 12
      Clover/app/src/main/java/org/floens/chan/ui/activity/ChanActivity.java
  6. 53
      Clover/app/src/main/java/org/floens/chan/ui/activity/ImageViewActivity.java
  7. 25
      Clover/app/src/main/java/org/floens/chan/ui/activity/ReplyActivity.java
  8. 6
      Clover/app/src/main/java/org/floens/chan/ui/fragment/ImageViewFragment.java
  9. 8
      Clover/app/src/main/java/org/floens/chan/ui/fragment/ReplyFragment.java
  10. 7
      Clover/app/src/main/java/org/floens/chan/ui/fragment/ThreadFragment.java
  11. 2
      Clover/app/src/main/java/org/floens/chan/ui/view/ThumbnailImageView.java
  12. 51
      Clover/app/src/main/res/layout/activity_base.xml
  13. 47
      Clover/app/src/main/res/layout/image_view.xml
  14. 25
      Clover/app/src/main/res/layout/reply_activity.xml
  15. 22
      Clover/app/src/main/res/layout/toolbar.xml
  16. 5
      Clover/app/src/main/res/values/colors.xml
  17. 6
      Clover/app/src/main/res/values/dimens.xml
  18. 24
      Clover/app/src/main/res/values/styles.xml

@ -67,6 +67,9 @@ android {
}
dependencies {
compile 'com.android.support:support-v13:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'org.jsoup:jsoup:1.7.3'
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48'

@ -123,7 +123,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:name="org.floens.chan.ui.activity.ImageViewActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:theme="@style/Theme.ImageList" />
android:theme="@style/Chan.ImageView" />
<activity android:name="org.floens.chan.ui.activity.ImagePickActivity" />
<activity android:name="org.floens.chan.ui.activity.DeveloperActivity" />
<activity

@ -0,0 +1,37 @@
/*
* Clover - 4chan browser https://github.com/Floens/Clover/
* Copyright (C) 2014 Floens
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.floens.chan.ui;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import org.floens.chan.R;
import org.floens.chan.utils.ThemeHelper;
public class ThemeActivity extends ActionBarActivity {
private Toolbar toolbar;
public void setTheme() {
setTheme(ThemeHelper.getInstance().getTheme().resValue);
}
public void setToolbar() {
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
}
}

@ -17,22 +17,21 @@
*/
package org.floens.chan.ui.activity;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.nfc.NdefMessage;
import android.nfc.NdefRecord;
import android.nfc.NfcAdapter;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SlidingPaneLayout;
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.ShareActionProvider;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
@ -43,7 +42,6 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.ShareActionProvider;
import org.floens.chan.ChanApplication;
import org.floens.chan.R;
@ -52,16 +50,14 @@ import org.floens.chan.core.model.ChanThread;
import org.floens.chan.core.model.Loadable;
import org.floens.chan.core.model.Pin;
import org.floens.chan.core.model.Post;
import org.floens.chan.ui.BadgeDrawable;
import org.floens.chan.ui.SwipeDismissListViewTouchListener;
import org.floens.chan.ui.SwipeDismissListViewTouchListener.DismissCallbacks;
import org.floens.chan.ui.ThemeActivity;
import org.floens.chan.ui.adapter.PinnedAdapter;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.utils.Utils;
import java.util.List;
public abstract class BaseActivity extends Activity implements PanelSlideListener, WatchManager.PinListener {
public abstract class BaseActivity extends ThemeActivity implements PanelSlideListener, WatchManager.PinListener {
public static boolean doRestartOnResume = false;
private final static int ACTION_OPEN_URL = 1;
@ -99,11 +95,13 @@ public abstract class BaseActivity extends Activity implements PanelSlideListene
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
ThemeHelper.getInstance().reloadPostViewColors(this);
setContentView(R.layout.activity_base);
setTheme();
setToolbar();
pinDrawer = (DrawerLayout) findViewById(R.id.drawer_layout);
initDrawer();
@ -155,7 +153,7 @@ public abstract class BaseActivity extends Activity implements PanelSlideListene
pinDrawerView = (ListView) findViewById(R.id.left_drawer);
pinnedAdapter = new PinnedAdapter(getActionBar().getThemedContext(), pinDrawerView); // Get the dark theme, not the light one
pinnedAdapter = new PinnedAdapter(getSupportActionBar().getThemedContext(), pinDrawerView); // Get the dark theme, not the light one
pinnedAdapter.reload();
pinDrawerView.setAdapter(pinnedAdapter);
@ -210,7 +208,7 @@ public abstract class BaseActivity extends Activity implements PanelSlideListene
}
private void updateIcon() {
List<Pin> list = ChanApplication.getWatchManager().getWatchingPins();
/*List<Pin> list = ChanApplication.getWatchManager().getWatchingPins();
if (list.size() > 0) {
int count = 0;
boolean color = false;
@ -223,13 +221,13 @@ public abstract class BaseActivity extends Activity implements PanelSlideListene
if (count > 0) {
Drawable icon = BadgeDrawable.get(getResources(), R.drawable.ic_launcher, count, color);
getActionBar().setIcon(icon);
getSupportActionBar().setIcon(icon);
} else {
getActionBar().setIcon(R.drawable.ic_launcher);
getSupportActionBar().setIcon(R.drawable.ic_launcher);
}
} else {
getActionBar().setIcon(R.drawable.ic_launcher);
}
getSupportActionBar().setIcon(R.drawable.ic_launcher);
}*/
}
public void removePin(Pin pin) {
@ -295,11 +293,11 @@ public abstract class BaseActivity extends Activity implements PanelSlideListene
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.base, menu);
shareActionProvider = (ShareActionProvider) menu.findItem(R.id.action_share).getActionProvider();
/*shareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menu.findItem(R.id.action_share));
if (pendingShareActionProviderIntent != null) {
shareActionProvider.setShareIntent(pendingShareActionProviderIntent);
pendingShareActionProviderIntent = null;
}
}*/
return true;
}

@ -17,7 +17,6 @@
*/
package org.floens.chan.ui.activity;
import android.app.ActionBar;
import android.app.AlertDialog;
import android.app.FragmentTransaction;
import android.content.Context;
@ -26,7 +25,8 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarDrawerToggle;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.Menu;
@ -89,7 +89,7 @@ public class ChanActivity extends BaseActivity implements AdapterView.OnItemSele
ft.replace(R.id.right_pane, threadFragment);
ft.commitAllowingStateLoss();
final ActionBar actionBar = getActionBar();
final ActionBar actionBar = getSupportActionBar();
boardSpinner = new Spinner(actionBar.getThemedContext());
spinnerAdapter = new BoardSpinnerAdapter(this, boardSpinner);
@ -180,9 +180,7 @@ public class ChanActivity extends BaseActivity implements AdapterView.OnItemSele
@Override
protected void initDrawer() {
pinDrawerListener = new ActionBarDrawerToggle(this, pinDrawer, R.drawable.ic_drawer, R.string.drawer_open,
R.string.drawer_close) {
};
pinDrawerListener = new ActionBarDrawerToggle(this, pinDrawer, R.string.drawer_open, R.string.drawer_close);
super.initDrawer();
}
@ -360,7 +358,7 @@ public class ChanActivity extends BaseActivity implements AdapterView.OnItemSele
}
private void updateActionBarStateCallback() {
final ActionBar actionBar = getActionBar();
final ActionBar actionBar = getSupportActionBar();
if (threadPane.isSlideable()) {
if (threadPane.isOpen()) {

@ -17,7 +17,6 @@
*/
package org.floens.chan.ui.activity;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
@ -26,8 +25,6 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
import android.view.Window;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import org.floens.chan.R;
@ -35,12 +32,12 @@ import org.floens.chan.chan.ImageSearch;
import org.floens.chan.core.ChanPreferences;
import org.floens.chan.core.manager.ThreadManager;
import org.floens.chan.core.model.Post;
import org.floens.chan.ui.ThemeActivity;
import org.floens.chan.ui.adapter.ImageViewAdapter;
import org.floens.chan.ui.adapter.PostAdapter;
import org.floens.chan.ui.fragment.ImageViewFragment;
import org.floens.chan.utils.ImageSaver;
import org.floens.chan.utils.Logger;
import org.floens.chan.utils.ThemeHelper;
import java.util.ArrayList;
import java.util.List;
@ -49,15 +46,16 @@ import java.util.List;
* An fragment pager that contains images. Call setPosts first, and then start
* the activity with startActivity()
*/
public class ImageViewActivity extends Activity implements ViewPager.OnPageChangeListener {
public class ImageViewActivity extends ThemeActivity implements ViewPager.OnPageChangeListener {
private static final String TAG = "ImageViewActivity";
private static PostAdapter postAdapterStatic;
private static int selectedIdStatic = -1;
private static int selectedNoStatic = -1;
private static ThreadManager threadManagerStatic;
private PostAdapter postAdapter;
private ThreadManager threadManager;
private int selectedNo;
private ImageViewAdapter adapter;
private ViewPager viewPager;
@ -72,7 +70,7 @@ public class ImageViewActivity extends Activity implements ViewPager.OnPageChang
*/
public static void launch(Activity activity, PostAdapter adapter, int selected, ThreadManager threadManager) {
postAdapterStatic = adapter;
selectedIdStatic = selected;
selectedNoStatic = selected;
threadManagerStatic = threadManager;
Intent intent = new Intent(activity, ImageViewActivity.class);
@ -82,44 +80,36 @@ public class ImageViewActivity extends Activity implements ViewPager.OnPageChang
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
ActionBar actionBar = getActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_HOME_AS_UP);
super.onCreate(savedInstanceState);
if (postAdapterStatic == null || threadManagerStatic == null) {
Logger.e(TAG, "postadapter or threadmanager null");
finish();
return;
}
super.onCreate(savedInstanceState);
threadManager = threadManagerStatic;
threadManagerStatic = null;
postAdapter = postAdapterStatic;
postAdapterStatic = null;
int selectedId = selectedIdStatic;
selectedIdStatic = -1;
selectedNo = selectedNoStatic;
selectedNoStatic = -1;
ThemeHelper.setTheme(this);
setContentView(R.layout.image_view);
setToolbar();
progressBar = new ProgressBar(this, null, android.R.attr.progressBarStyleHorizontal);
progressBar.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT));
progressBar.setProgressDrawable(getResources().getDrawable(R.drawable.progressbar_no_bg));
initProgressBar();
initPager();
}
private void initProgressBar() {
progressBar = (ProgressBar) findViewById(R.id.progress_bar);
// progressBar.setProgressDrawable(getResources().getDrawable(R.drawable.progressbar_no_bg));
progressBar.setIndeterminate(false);
progressBar.setMax(1000000);
}
final FrameLayout decorView = (FrameLayout) getWindow().getDecorView();
decorView.addView(progressBar);
progressBar.post(new Runnable() {
@Override
public void run() {
View contentView = decorView.findViewById(android.R.id.content);
progressBar.setY(contentView.getY() - progressBar.getHeight() / 2);
}
});
private void initPager() {
// Get the posts with images
ArrayList<Post> imagePosts = new ArrayList<>();
for (Post post : postAdapter.getList()) {
@ -129,7 +119,6 @@ public class ImageViewActivity extends Activity implements ViewPager.OnPageChang
}
// Setup our pages and adapter
setContentView(R.layout.image_pager);
viewPager = (ViewPager) findViewById(R.id.image_pager);
adapter = new ImageViewAdapter(getFragmentManager(), this);
adapter.setList(imagePosts);
@ -138,7 +127,7 @@ public class ImageViewActivity extends Activity implements ViewPager.OnPageChang
// Select the right image
for (int i = 0; i < imagePosts.size(); i++) {
if (imagePosts.get(i).no == selectedId) {
if (imagePosts.get(i).no == selectedNo) {
viewPager.setCurrentItem(i);
onPageSelected(i);
break;

@ -17,42 +17,45 @@
*/
package org.floens.chan.ui.activity;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.MenuItem;
import org.floens.chan.R;
import org.floens.chan.core.model.Loadable;
import org.floens.chan.ui.ThemeActivity;
import org.floens.chan.ui.fragment.ReplyFragment;
import org.floens.chan.utils.Logger;
import org.floens.chan.utils.ThemeHelper;
public class ReplyActivity extends Activity {
public class ReplyActivity extends ThemeActivity {
private static final String TAG = "ReplyActivity";
private static Loadable loadable;
private static Loadable staticLoadable;
public static void setLoadable(Loadable l) {
loadable = l;
staticLoadable = l;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
Loadable loadable = staticLoadable;
staticLoadable = null;
if (loadable != null && savedInstanceState == null) {
getActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.reply_activity);
setTheme();
setToolbar();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(android.R.id.content, ReplyFragment.newInstance(loadable, false), "reply");
ft.replace(R.id.reply_fragment, ReplyFragment.newInstance(loadable, false), "reply");
ft.commitAllowingStateLoss();
loadable = null;
} else if (savedInstanceState == null) {
Logger.e(TAG, "ThreadFragment was null, exiting!");
Logger.e(TAG, "Loadable was null, exiting!");
finish();
}
}

@ -82,7 +82,7 @@ public class ImageViewFragment extends Fragment implements ThumbnailImageViewCal
imageView = new ThumbnailImageView(context);
imageView.setCallback(this);
int padding = Utils.dp(8);
int padding = getResources().getDimensionPixelSize(R.dimen.image_view_padding);
imageView.setPadding(padding, padding, padding, padding);
return imageView;
@ -177,10 +177,10 @@ public class ImageViewFragment extends Fragment implements ThumbnailImageViewCal
activity.setProgressBarIndeterminateVisibility(showProgressBar);
String filename = post.filename + "." + post.ext;
activity.getActionBar().setTitle(filename);
activity.getSupportActionBar().setTitle(filename);
String text = (position + 1) + "/" + adapter.getCount();
activity.getActionBar().setSubtitle(text);
activity.getSupportActionBar().setSubtitle(text);
activity.invalidateActionBar();

@ -17,12 +17,12 @@
*/
package org.floens.chan.ui.fragment;
import android.app.Activity;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@ -106,7 +106,7 @@ public class ReplyFragment extends DialogFragment {
private TextView commentCountView;
private TextView fileStatusView;
private Activity context;
private ActionBarActivity context;
public static ReplyFragment newInstance(Loadable loadable, boolean quickMode) {
ReplyFragment reply = new ReplyFragment();
@ -127,7 +127,7 @@ public class ReplyFragment extends DialogFragment {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
context = getActivity();
context = (ActionBarActivity) getActivity();
if (loadable == null && savedInstanceState != null) {
loadable = new Loadable();
@ -142,7 +142,7 @@ public class ReplyFragment extends DialogFragment {
String title = (loadable.isThreadMode() ? context.getString(R.string.reply) : context.getString(R.string.reply_to_board)) + " " + loadable.title;
if (dialog == null) {
context.getActionBar().setTitle(title);
context.getSupportActionBar().setTitle(title);
} else {
dialog.setTitle(title);
// todo move elsewhere

@ -281,13 +281,8 @@ public class ThreadFragment extends Fragment implements ThreadManager.ThreadMana
} else if (viewMode == ThreadManager.ViewMode.GRID) {
GridView grid = new GridView(getActivity());
grid.setNumColumns(GridView.AUTO_FIT);
TypedArray ta = getActivity().obtainStyledAttributes(null, R.styleable.PostView, R.attr.post_style, 0);
int postGridWidth = ta.getDimensionPixelSize(R.styleable.PostView_grid_width, 0);
int postGridSpacing = ta.getDimensionPixelSize(R.styleable.PostView_grid_spacing, 0);
ta.recycle();
int postGridWidth = baseActivity.getResources().getDimensionPixelSize(R.dimen.post_grid_width);
grid.setColumnWidth(postGridWidth);
grid.setVerticalSpacing(postGridSpacing);
grid.setHorizontalSpacing(postGridSpacing);
listView = grid;
postAdapter = new PostAdapter(getActivity(), threadManager, listView, this);
listView.setAdapter(postAdapter);

@ -125,7 +125,7 @@ public class ThumbnailImageView extends LoadView implements View.OnClickListener
@Override
public void onProgress(long downloaded, long total, boolean done) {
if (done) {
callback.setLinearProgress(0, 0, true);
// callback.setLinearProgress(0, 0, true);
thumbnailNeeded = false;
} else {
callback.setLinearProgress(downloaded, total, false);

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens
@ -16,30 +15,38 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.SlidingPaneLayout
android:id="@+id/pane_container"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/left_pane"
android:layout_width="100dp"
android:layout_height="match_parent"
style="?board_pane_left_style"/>
<FrameLayout
android:id="@+id/right_pane"
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?board_pane_right_style"/>
</android.support.v4.widget.SlidingPaneLayout>
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<android.support.v4.widget.SlidingPaneLayout
android:id="@+id/pane_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/left_pane"
android:layout_width="100dp"
android:layout_height="match_parent"
style="?board_pane_left_style" />
<FrameLayout
android:id="@+id/right_pane"
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?board_pane_right_style" />
</android.support.v4.widget.SlidingPaneLayout>
</LinearLayout>
<ListView
android:id="@+id/left_drawer"
@ -49,6 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:background="#444"
android:choiceMode="singleChoice"
android:divider="#333"
android:dividerHeight="1dp"/>
android:dividerHeight="1dp" />
</android.support.v4.widget.DrawerLayout>

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?><!--
Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/black"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<org.floens.chan.ui.view.HackyViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/image_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ProgressBar
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:id="@+id/progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens
@ -16,18 +15,16 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/image_list_background"
android:orientation="vertical">
android:layout_height="match_parent">
<org.floens.chan.ui.view.HackyViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/image_pager"
<include layout="@layout/toolbar" />
<FrameLayout
android:id="@+id/reply_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</org.floens.chan.ui.view.HackyViewPager>
</RelativeLayout>
android:layout_height="wrap_content" />
</LinearLayout>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?><!--
Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary" />

@ -17,5 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<color name="primary">#ff43a047</color>
<color name="primary_dark">#ff2e7d32</color>
<color name="holo_blue_dark">#ff0099cc</color>
<color name="image_view_background">#bb000000</color>
</resources>

@ -17,4 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<dimen name="navdrawer_width">260dp</dimen>
<dimen name="image_view_padding">4dp</dimen>
<dimen name="post_grid_width">90dp</dimen>
<!--<dimen name="post_grid_height">300dp</dimen>-->
</resources>

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens
@ -18,17 +17,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<style name="Theme.ImageList" parent="AppTheme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:backgroundDimEnabled">true</item>
<style name="Chan.Theme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent_material_light</item>
</style>
<color name="image_list_background">#88000000</color>
<style name="Chan.ImageView" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@color/image_view_background</item>
<item name="android:windowIsTranslucent">true</item>
<!--<item name="android:backgroundDimEnabled">true</item>-->
</style>
<!-- Light theme -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<style name="AppTheme" parent="Chan.Theme">
<item name="board_pane_style">@style/BoardPane</item>
<item name="board_pane_left_style">@style/BoardLeftPane</item>
<item name="board_pane_right_style">@style/BoardRightPane</item>
@ -79,10 +81,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</style>
<style name="PostView">
<item name="grid_width">90dp</item>
<item name="grid_height">300dp</item>
<item name="grid_spacing">0dp</item>
<item name="title_size">14sp</item>
<item name="detail_size">10sp</item>
<item name="icon_padding">6dp</item>

Loading…
Cancel
Save