Some toolbar changes.

material
Floens 11 years ago
parent 11e3573d3d
commit 87173ce4b4
  1. 2
      Clover/app/build.gradle
  2. 2
      Clover/app/src/main/java/org/floens/chan/ui/activity/ChanActivity.java
  3. 34
      Clover/app/src/main/res/layout/header_switch_layout.xml
  4. 6
      Clover/app/src/main/res/layout/toolbar.xml
  5. 6
      Clover/app/src/main/res/values/attrs.xml
  6. 6
      Clover/app/src/main/res/values/styles.xml

@ -68,7 +68,7 @@ android {
dependencies { dependencies {
compile 'com.android.support:support-v13:21.0.0' compile 'com.android.support:support-v13:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.2' compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v13:18.0.0' compile 'com.android.support:support-v13:18.0.0'
compile 'org.jsoup:jsoup:1.8.1' compile 'org.jsoup:jsoup:1.8.1'

@ -91,7 +91,7 @@ public class ChanActivity extends BaseActivity implements AdapterView.OnItemSele
final ActionBar actionBar = getSupportActionBar(); final ActionBar actionBar = getSupportActionBar();
boardSpinner = new Spinner(actionBar.getThemedContext()); boardSpinner = new Spinner(this, null, R.attr.test_spinner_style);
spinnerAdapter = new BoardSpinnerAdapter(this, boardSpinner); spinnerAdapter = new BoardSpinnerAdapter(this, boardSpinner);
boardSpinner.setAdapter(spinnerAdapter); boardSpinner.setAdapter(spinnerAdapter);
boardSpinner.setOnItemSelectedListener(this); boardSpinner.setOnItemSelectedListener(this);

@ -16,52 +16,44 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout 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_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" /> <include layout="@layout/toolbar" />
<FrameLayout <LinearLayout
android:id="@+id/toggle_bar" android:id="@+id/toggle_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="56dp"
android:background="?attr/selectableItemBackground" android:background="#ff9e9e9e"
android:clickable="true"> android:orientation="horizontal">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ff9e9e9e">
<TextView <TextView
android:layout_gravity="center_vertical"
android:id="@+id/toggle_status" android:id="@+id/toggle_status"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_gravity="center_vertical"
android:layout_marginBottom="6dip"
android:layout_marginLeft="24dp" android:layout_marginLeft="24dp"
android:layout_marginRight="6dip" android:layout_marginRight="6dip"
android:layout_marginTop="6dip" android:layout_marginTop="6dip"
android:layout_marginBottom="6dip" android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
android:textColor="#ffffffff" android:textAppearance="?android:attr/textAppearanceMedium"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textColor="#ffffffff" />
<android.support.v7.widget.SwitchCompat <android.support.v7.widget.SwitchCompat
android:layout_gravity="center_vertical"
android:id="@+id/toggle" android:id="@+id/toggle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="20dp" android:layout_gravity="center_vertical"
android:clickable="true"
android:focusable="false" android:focusable="false"
android:clickable="true" /> android:paddingRight="20dp" />
</LinearLayout> </LinearLayout>
</FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/content" android:id="@+id/content"
android:layout_width="match_parent" android:layout_width="match_parent"

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:minHeight="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> app:popupTheme="?attr/toolbar_popup_theme"
app:theme="?attr/toolbar_theme" />

@ -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/ Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens Copyright (C) 2014 Floens
@ -17,6 +16,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<resources> <resources>
<attr name="toolbar_theme" format="reference" />
<attr name="toolbar_popup_theme" format="reference" />
<attr name="board_pane_style" format="reference" /> <attr name="board_pane_style" format="reference" />
<attr name="board_pane_left_style" format="reference" /> <attr name="board_pane_left_style" format="reference" />
<attr name="board_pane_right_style" format="reference" /> <attr name="board_pane_right_style" format="reference" />

@ -42,8 +42,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<item name="board_edit_item_style">@style/BoardEditItem</item> <item name="board_edit_item_style">@style/BoardEditItem</item>
<item name="android:textColor">#ff000000</item> <item name="android:textColor">#ff000000</item>
</style>
<item name="toolbar_theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<item name="toolbar_popup_theme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<!-- Dark theme --> <!-- Dark theme -->
<style name="AppTheme.Dark" parent="android:Theme.Holo"> <style name="AppTheme.Dark" parent="android:Theme.Holo">
@ -81,7 +83,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</style> </style>
<style name="BoardRightPane"> <style name="BoardRightPane">
<item name="android:background">#FFE5E5E5</item> <item name="android:background">#FFFFFFFF</item>
</style> </style>
<style name="PostView"> <style name="PostView">

Loading…
Cancel
Save