Histogram foto picture smartphone
Very dark picture, in photo editor black remains black
Very bright picture, in photo editor white will white
Dark picture but the chart is not in black color area - dark shades can be lighten in graphics editor
Very bright picture, in photo editor white will white
Dark picture but the chart is not in black color area - dark shades can be lighten in graphics editor
396LW NO topic_id
AD
Další témata ....(Topics)
Problem: erroneous entry of id
Solution: @+id/
<RadioButton android:id="idRadio"
android:text="My radio button"/>
Solution: @+id/
<RadioButton android:id="@+id/idRadio"
android:text="My radio button"/>
How to resize an image in ImageView Android source code.
Resize imageview layout and image will resize too:
Resize imageview layout and image will resize too:
public void resizeImageView(int width, int height) {
final ImageView picture1 = (ImageView)findViewById(R.id.imageView1);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(width, height);
picture1.setLayoutParams(layoutParams);
}
Integer, Float, String, List passed as reference in JAVA example source code:
// List passed as reference JAVA
List<Integer>list = new ArrayList<Integer>();
public void fc (List<Integer>listRef){
listRef.add(7);
listRef.add(5);
}
fc(list); // 7, 5
// String passed as reference JAVA
public void mutate(AtomicReference<Object> ref) { ref.set("Goodbye"); }
AtomicReference<Object> ref = new AtomicReference<Object>("Hello");
mutate(ref);
System.out.println(ref.get()); //Goodbye!
String s = (String) ref.get();
// Integer passed as reference JAVA
private static void mutate(AtomicReference<Object> ref) { ref.set(7); }
//public static void main(String[] arg) {
AtomicReference<Object> ref = new AtomicReference<Object>(5);
mutate(ref);
System.out.println(ref.get()); // 7
int n = (Integer) ref.get();
// Float passed as reference JAVA
private static void mutate(AtomicReference<Object> ref) { ref.set(14.8f); }
//public static void main(String[] arg) {
AtomicReference<Object> ref = new AtomicReference<Object>(12.1f);
mutate(ref);
float f = (Float) ref.get();
System.out.println(f); //14.8
// in AndroidManifest.xml
<Activity
android:screenOrientation="portrait" // or landscape
// in MyActivity.java
boolean mbOrientacionLandscape = false;
int nOrientation = getResources().getConfiguration().orientation;
if(mbOrientacionLandscape==true){
getResources().getConfiguration();
if(nOrientation != Configuration.ORIENTATION_LANDSCAPE)
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
else{
if(nOrientation != Configuration.ORIENTATION_PORTRAIT)
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
TypeFace, setTypeface, font, font family, array of String, Button create dynamically
@Override
protected void onStart() {
LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(
48,
55
);
Typeface typeFace = Typeface.MONOSPACE;
String [] ar = {"A","B","C","D","E","F","G","H","J","K"};
for (int i = 0; i < ar.length; i++) {
Button buttonView = new Button(this);
buttonView.setText(Html.fromHtml("<b>"+ar[i]+"</b>"));
buttonView.setTextColor(Color.BLUE);
buttonView.setTextSize(27.f);
buttonView.setTypeface(typeFace,Typeface.BOLD);
buttonView.setOnClickListener(mThisButtonListener);
if(i%2==0)
mLayoutButtons.addView(buttonView, p);
else
mLayoutButtonsNextRow.addView(buttonView, p);
_listOfButtons.add(buttonView);
}
super.onStart();
}
//////// xml file
<TextView
android:id="@+id/text01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:fontFamily="Arial"
/>
Editace: 2017-08-05 13:45:38
Počet článků v kategorii: 396
Url:histogram-foto-picture-smartphone