Skip to content

Commit

Permalink
removing Tags from summary list
Browse files Browse the repository at this point in the history
  • Loading branch information
wizmer committed Feb 26, 2016
1 parent f860629 commit 0bd3867
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 43 deletions.
1 change: 0 additions & 1 deletion MobileOrg/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/build
src/main/res/values/dropbox.xml
2 changes: 1 addition & 1 deletion MobileOrg/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
</activity>

<activity
android:name=".Settings"
android:name=".Settings.SettingsActivity"
android:label="MobileOrg Settings"
android:theme="@style/AppTheme.NoActionBar">
</activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public class ViewHolder extends RecyclerView.ViewHolder {

public OrgNodeTree mItem;
private TextView titleView;
private TextView tagsView;
private Button todoButton;
private TextView levelView;
private boolean levelFormatting = true;
Expand All @@ -239,13 +238,11 @@ public ViewHolder(View view) {
mView = view;

titleView = (TextView) view.findViewById(R.id.outline_item_title);
tagsView = (TextView) view.findViewById(R.id.outline_item_tags);
todoButton = (Button) view.findViewById(R.id.outline_item_todo);
levelView = (TextView) view.findViewById(R.id.outline_item_level);
todoButton.setOnClickListener(todoClick);

int fontSize = PreferenceUtils.getFontSize();
tagsView.setTextSize(fontSize);
todoButton.setTextSize(fontSize);
}

Expand Down Expand Up @@ -334,19 +331,6 @@ private void formatLinks(SpannableStringBuilder titleSpan) {
}
}

public void setupTags(String tags, String tagsInherited) {
if(!TextUtils.isEmpty(tags) || !TextUtils.isEmpty(tagsInherited)) {
if (!TextUtils.isEmpty(tagsInherited))
tagsView.setText(tags + "::" + tagsInherited);
else
tagsView.setText(tags);


tagsView.setVisibility(View.VISIBLE);
} else
tagsView.setVisibility(View.GONE);
}

public void setLevelFormating(boolean enabled) {
this.levelFormatting = enabled;
}
Expand All @@ -355,7 +339,6 @@ public void setLevelFormating(boolean enabled) {

public void setup(OrgNode node) {
this.mItem.node = node;
setupTags(node.tags, node.tags_inherited);

SpannableStringBuilder titleSpan = new SpannableStringBuilder(node.name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ static public void setupTodoButton(Context context, OrgNode node,
int green = ContextCompat.getColor(context, R.color.colorGreen);
todoSpan.setSpan(new ForegroundColorSpan(active ? red : green), 0,
todoString.length(), 0);
if(toggleVisibility) button.setVisibility(View.VISIBLE);
button.setText(todoSpan);
button.setTextColor(active ? red : green);
} else {
if(toggleVisibility) button.setVisibility(View.GONE);
if(toggleVisibility) button.setVisibility(View.INVISIBLE);
else button.setText(context.getResources().getString(R.string.no_state));
}
}
Expand Down
33 changes: 10 additions & 23 deletions MobileOrg/src/main/res/layout/detail_recycler_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,45 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minHeight="@dimen/outline_item"
android:orientation="vertical"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp" >

<TextView
android:id="@+id/outline_item_level"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text=""
android:textAppearance="?android:attr/textAppearanceMedium" >
</TextView>

<Button
<Button
android:id="@+id/outline_item_todo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/outline_item_level"
android:layout_toEndOf="@+id/outline_item_level"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:background="@android:color/transparent"
android:focusable="true"
android:minHeight="30dp"
android:minWidth="40dp"
android:text="" />

<TextView
android:id="@+id/outline_item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/outline_item_todo"
android:layout_toEndOf="@+id/outline_item_todo"
android:layout_toRightOf="@id/outline_item_level"
android:layout_toEndOf="@id/outline_item_level"
android:layout_toLeftOf="@id/outline_item_todo"
android:layout_toStartOf="@id/outline_item_todo"
android:text=""
android:textAppearance="?android:attr/textAppearanceMedium" >
</TextView>

<TextView
android:id="@+id/outline_item_tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/outline_item_title"
android:paddingLeft="10dp"
android:paddingStart="10dp"
android:paddingRight="10dp"
android:paddingEnd="10dp"
android:textStyle="bold"
android:textColor="@color/colorGray"
android:text="" >
</TextView>

</RelativeLayout>

0 comments on commit 0bd3867

Please sign in to comment.