This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onDraw(Canvas canvas) { | |
Paint Pnt = new Paint(); | |
canvas.drawColor(Color.WHITE); | |
// 캡 모양 테스트 | |
Pnt.setColor(Color.BLUE); | |
Pnt.setStrokeWidth(4); | |
canvas.drawLine(10,10,200,10,Pnt); | |
Pnt.setStrokeCap(Paint.Cap.ROUND); | |
canvas.drawLine(10,30,200,30,Pnt); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onDraw(Canvas canvas) { | |
Paint Pnt = new Paint(); | |
//canvas.drawARGB(255, 255, 255, 255); | |
//canvas.drawRGB(255, 255, 255); | |
//canvas.drawColor(0xffffffff); | |
Pnt.setColor(Color.WHITE); | |
canvas.drawPaint(Pnt); | |
RectF r = new RectF(10,10,100,100); | |
Pnt.setColor(Color.YELLOW); | |
canvas.drawRoundRect(r,10,10,Pnt); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onDraw(Canvas canvas) { | |
Paint Pnt = new Paint(); | |
canvas.drawColor(Color.WHITE); | |
canvas.drawPoint(10, 10, Pnt); | |
Pnt.setColor(Color.BLUE); | |
canvas.drawLine(20, 10, 200, 50, Pnt); | |
Pnt.setColor(Color.RED); | |
canvas.drawCircle(100, 90, 50, Pnt); | |
Pnt.setColor(0x800000ff); | |
canvas.drawRect(10,100,200,170,Pnt); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomView extends Activity { | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
MyView vw = new MyView(this); | |
setContentView(vw); | |
} | |
protected class MyView extends View { | |
public MyView(Context context) { | |
super(context); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for UIScrollView | |
- (void)disableScrollToTopPropertyOnAllSubViewsOf:(UIView *)view { | |
for(UIView *subview in view.subviews) { | |
if([subview isKindOfClass:[UIScrollView class]]) { | |
((UIScrollView *) subview).scrollsToTop = NO; | |
} | |
[self disableScrollToTopPropertyOnAllSubViewsOf:subview]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - | |
#pragma mark Table view data source | |
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { | |
return 1; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
NSInteger rows; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define BUFFER 128 | |
int main(int argc, char* argv[]) | |
{ | |
char buf[BUFFER]; | |
char* ptr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.catchabug.LayoutGravityTest; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.LinearLayout; | |
public class LayoutGravityTest extends Activity { | |
/** Called when the activity is first created. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
> | |
<TableRow> | |
<TextView android:text="국어" android:textSize="15pt" android:padding="10px" /> | |
<TextView android:text="영어" android:textSize="15pt" android:padding="10px" /> | |
<TextView android:text="수학" android:textSize="15pt" android:padding="10px" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.catchabug.FrameLayout; | |
import android.app.*; | |
import android.os.*; | |
import android.util.Log; | |
import android.view.*; | |
import android.widget.*; | |
public class Frame extends Activity { | |
public void onCreate(Bundle savedInstanceState) { |