mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 17:18:52 -06:00
Initial import
This commit is contained in:
45
res/layout/color_picker_dialog.xml
Normal file
45
res/layout/color_picker_dialog.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:padding="28dp" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@android:id/progress"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center" />
|
||||
|
||||
<com.android.colorpicker.ColorPickerPalette
|
||||
android:id="@+id/color_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
</ScrollView>
|
||||
28
res/layout/color_picker_swatch.xml
Normal file
28
res/layout/color_picker_swatch.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ImageView
|
||||
android:id="@+id/color_picker_swatch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<ImageView
|
||||
android:id="@+id/color_picker_checkmark"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_colorpicker_swatch_selected"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone" />
|
||||
</merge>
|
||||
135
res/layout/edit_habit.xml
Normal file
135
res/layout/edit_habit.xml
Normal file
@@ -0,0 +1,135 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="org.isoron.uhabits.dialogs.EditHabitFragment"
|
||||
tools:ignore="MergeRootFrame" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/formPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/namePanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
android:background="@drawable/apptheme_edit_text_holo_light"
|
||||
android:ems="10"
|
||||
android:hint="Name"
|
||||
android:textColor="#cc2222" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_pick_color"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_action_pick_color" />
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="Description"
|
||||
android:inputType="textMultiLine" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Repeat " />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_freq_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="7"
|
||||
android:maxLength="2"
|
||||
android:inputType="number"
|
||||
android:gravity="center"
|
||||
android:ems="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" times every " />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_freq_den"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="7"
|
||||
android:maxLength="2"
|
||||
android:inputType="number"
|
||||
android:gravity="center"
|
||||
android:ems="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" days" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttonPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="?android:attr/dividerHorizontal"
|
||||
android:dividerPadding="0dip"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="beginning" >
|
||||
|
||||
<LinearLayout
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="onClick"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_discard"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="Discard" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_save"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="Save" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
15
res/layout/main_activity.xml
Normal file
15
res/layout/main_activity.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.isoron.uhabits.MainActivity"
|
||||
tools:ignore="MergeRootFrame" >
|
||||
|
||||
<fragment
|
||||
android:id="@+id/fragment1"
|
||||
android:name="org.isoron.uhabits.dialogs.ShowHabitsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
63
res/layout/show_habits.xml
Normal file
63
res/layout/show_habits.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:dslv="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffff" >
|
||||
|
||||
<!-- <ListView -->
|
||||
<!-- android:id="@+id/listView" -->
|
||||
<!-- android:layout_width="match_parent" -->
|
||||
<!-- android:layout_height="match_parent" -->
|
||||
<!-- android:divider="#00000000" -->
|
||||
<!-- android:dividerHeight="0dp"> -->
|
||||
<!-- </ListView> -->
|
||||
|
||||
<com.mobeta.android.dslv.DragSortListView
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#00000000"
|
||||
android:dividerHeight="0dp"
|
||||
dslv:drag_enabled="true"
|
||||
dslv:drag_handle_id="@drawable/habits_header_check"
|
||||
dslv:drag_start_mode="onMove"
|
||||
dslv:float_alpha="0.5"
|
||||
dslv:sort_enabled="true"
|
||||
dslv:track_drag_sort="false"
|
||||
dslv:use_default_controller="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/habits_header" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStarHeader"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="0dp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNameHeader"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingTop="6dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llButtonsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:orientation="horizontal" >
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
10
res/layout/show_habits_header_check.xml
Normal file
10
res/layout/show_habits_header_check.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tvCheck"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/habits_header_check"
|
||||
android:focusable="false"
|
||||
android:minHeight="42dp"
|
||||
android:minWidth="42dp"
|
||||
android:textSize="10sp" />
|
||||
35
res/layout/show_habits_item.xml
Normal file
35
res/layout/show_habits_item.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/habits_item"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStar"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="0dp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="1dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingTop="6dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llButtons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
10
res/layout/show_habits_item_check.xml
Normal file
10
res/layout/show_habits_item_check.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tvCheck"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="18dp"
|
||||
android:minHeight="42dp"
|
||||
android:minWidth="42dp"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/habits_item_check" />
|
||||
Reference in New Issue
Block a user