[go: nahoru, domu]

Skip to content

Commit

Permalink
Add ColorInt annotation to MDColor
Browse files Browse the repository at this point in the history
  • Loading branch information
bassaer committed Feb 21, 2017
1 parent 07c6b1b commit f55eaa7
Show file tree
Hide file tree
Showing 3 changed files with 625 additions and 359 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TableLayout;
import android.widget.TableRow;

import com.github.bassaer.library.MDColor;

Expand All @@ -10,11 +13,29 @@

public class MainActivity extends AppCompatActivity {

public static final int NUM_OF_14_COLORS = 16;
public static final int NUM_OF_10_COLORS = 3;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

TableLayout tableLayout = (TableLayout)findViewById(R.id.table_layout);
getLayoutInflater().inflate(R.layout.table_low_14_pallette, tableLayout);

for (int i = 0; i < NUM_OF_14_COLORS; i++) {
TableRow tableRow = (TableRow)tableLayout.getChildAt(i);
for (int j = 0; j < 14; j++) {
View color50 = findViewById(R.id.table_row_14_50);

}
}

for (int i = 0; i < NUM_OF_10_COLORS; i++ ) {

}


}

Expand Down
126 changes: 42 additions & 84 deletions app/src/main/res/layout/table_low_14_pallette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,130 +3,88 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
<View
android:id="@+id/table_row_14_50"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_50"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_100"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_100"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_200"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_200"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_300"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_300"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_400"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_400"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_500"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_500"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_600"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_600"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_700"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_700"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_800"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_800"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_900"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_900"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_a_100"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/a_100"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_a_200"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/a_200"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_a_400"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/a_400"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

<TextView
<View
android:id="@+id/table_row_14_a_700"
android:layout_height="match_parent"
android:layout_height="@dimen/cell_height"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/a_700"
android:textColor="@android:color/white"/>
android:layout_weight="1"/>

</TableRow>
Loading

0 comments on commit f55eaa7

Please sign in to comment.