@ -0,0 +1,48 @@ |
||||
/* |
||||
* 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 android.view.MenuItem; |
||||
|
||||
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); |
||||
} |
||||
|
||||
@Override |
||||
public boolean onOptionsItemSelected(final MenuItem item) { |
||||
if (item.getItemId() == android.R.id.home) { |
||||
finish(); |
||||
return true; |
||||
} else { |
||||
return super.onOptionsItemSelected(item); |
||||
} |
||||
} |
||||
} |
Before Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 531 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 330 B |
After Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 346 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 876 B After Width: | Height: | Size: 637 B |
After Width: | Height: | Size: 378 B |
After Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 525 B |
After Width: | Height: | Size: 419 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 632 B |
After Width: | Height: | Size: 659 B |
After Width: | Height: | Size: 517 B |
@ -0,0 +1,29 @@ |
||||
<?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/>. |
||||
--> |
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:id="@android:id/text1" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:textSize="16sp" |
||||
android:textColor="#ff000000" |
||||
android:gravity="center_vertical" |
||||
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" |
||||
android:paddingRight="?android:attr/listPreferredItemPaddingRight" |
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall" |
||||
android:singleLine="true" |
||||
android:ellipsize="end" /> |
@ -0,0 +1,63 @@ |
||||
<?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" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical"> |
||||
|
||||
<include layout="@layout/toolbar" /> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/toggle_bar" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="56dp" |
||||
android:background="#ff9e9e9e" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:id="@+id/toggle_status" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_gravity="center_vertical" |
||||
android:layout_marginBottom="6dip" |
||||
android:layout_marginLeft="24dp" |
||||
android:layout_marginRight="6dip" |
||||
android:layout_marginTop="6dip" |
||||
android:layout_weight="1" |
||||
android:singleLine="true" |
||||
android:textAppearance="?android:attr/textAppearanceMedium" |
||||
android:textColor="#ffffffff" /> |
||||
|
||||
<android.support.v7.widget.SwitchCompat |
||||
android:id="@+id/toggle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_gravity="center_vertical" |
||||
android:clickable="true" |
||||
android:focusable="false" |
||||
android:paddingRight="20dp" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
<FrameLayout |
||||
android:id="@+id/content" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="0dp" |
||||
android:layout_weight="1" /> |
||||
|
||||
</LinearLayout> |
@ -0,0 +1,48 @@ |
||||
<?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" |
||||
android:layout_marginTop="-7dp" /> |
||||
|
||||
</FrameLayout> |
||||
</LinearLayout> |
@ -0,0 +1,26 @@ |
||||
<?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" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:id="@+id/toolbar" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="?attr/actionBarSize" |
||||
android:background="?attr/colorPrimary" |
||||
android:minHeight="?attr/actionBarSize" |
||||
app:popupTheme="?attr/toolbar_popup_theme" |
||||
app:theme="?attr/toolbar_theme" /> |
@ -0,0 +1,32 @@ |
||||
<?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" |
||||
android:orientation="vertical" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:padding="8dp" |
||||
android:gravity="center"> |
||||
|
||||
<TextView |
||||
android:id="@+id/text" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center" |
||||
style="?android:attr/textAppearanceMedium" /> |
||||
|
||||
</LinearLayout> |